Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

liyichao
Copy link

@liyichao liyichao commented Jun 14, 2024

fix #11643

@@ -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();
Copy link
Contributor

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.

Suggested change
log.writer.file()->reset_seen_error();
log.writer->file()->reset_seen_error();

Copy link
Author

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Contributor

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)

@jsteemann
Copy link
Contributor

jsteemann commented Jun 14, 2024

Side note: I tried the change to check if it would fix #9762 as well, but it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to resume DB after "no space left on device" error.
4 participants