-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reset seen error when resume succeed. #12772
base: main
Are you sure you want to change the base?
Conversation
db/db_impl/db_impl.cc
Outdated
@@ -422,6 +422,11 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { | |||
// finish. Those previouly waiting threads can now proceed, which may | |||
// include closing the db. | |||
s = error_handler_.ClearBGError(); | |||
log_write_mutex_.Lock(); | |||
for (auto& log : logs_) { | |||
log.writer.file()->reset_seen_error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code did not compile for me. I think log.writer
is a pointer.
log.writer.file()->reset_seen_error(); | |
log.writer->file()->reset_seen_error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this and add a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liyichao : thanks for your fix! Note that I am not affiliated with the RocksDB team. I was just trying your PR locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liyichao I think there were some concerns about the approach on the linked issue: #11643 (comment)
Side note: I tried the change to check if it would fix #9762 as well, but it doesn't. |
fix #11643