-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Deflake DBErrorHandlingFSTest.MultiCFWALWriteError #9496
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -400,14 +400,6 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { | |
|
||
JobContext job_context(0); | ||
FindObsoleteFiles(&job_context, true); | ||
if (s.ok()) { | ||
s = error_handler_.ClearBGError(); | ||
} else { | ||
// NOTE: this is needed to pass ASSERT_STATUS_CHECKED | ||
// in the DBSSTTest.DBWithMaxSpaceAllowedRandomized test. | ||
// See https://github.com/facebook/rocksdb/pull/7715#issuecomment-754947952 | ||
error_handler_.GetRecoveryError().PermitUncheckedError(); | ||
} | ||
mutex_.Unlock(); | ||
|
||
job_context.manifest_file_number = 1; | ||
|
@@ -428,11 +420,31 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { | |
immutable_db_options_.info_log, | ||
"DB resume requested but could not enable file deletions [%s]", | ||
s.ToString().c_str()); | ||
assert(false); | ||
} | ||
} | ||
ROCKS_LOG_INFO(immutable_db_options_.info_log, "Successfully resumed DB"); | ||
} | ||
|
||
mutex_.Lock(); | ||
if (s.ok()) { | ||
// This will notify and unblock threads waiting for error recovery to | ||
// finish. Those previouly waiting threads can now proceed, which may | ||
// include closing the db. | ||
s = error_handler_.ClearBGError(); | ||
} else { | ||
// NOTE: this is needed to pass ASSERT_STATUS_CHECKED | ||
// in the DBSSTTest.DBWithMaxSpaceAllowedRandomized test. | ||
// See https://github.com/facebook/rocksdb/pull/7715#issuecomment-754947952 | ||
error_handler_.GetRecoveryError().PermitUncheckedError(); | ||
} | ||
|
||
if (s.ok()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make ROCKS_LOG_INFO(immutable_db_options_.info_log, "Successfully resumed DB"); more clear, I separated it into its own if-block. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right that after calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got you - the unlock/lock again behavior came from the original PR 52d4c9b#diff-6fdb755f590d9b01ecb89bd8ceb28577e85536d4472f8e4fc3addeb9a65f3645R269 but I will change it. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, maybe it's better to log the status anyway even if it's non-ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
ROCKS_LOG_INFO(immutable_db_options_.info_log, "Successfully resumed DB"); | ||
} else { | ||
ROCKS_LOG_INFO(immutable_db_options_.info_log, "Failed to resume DB [%s]", | ||
s.ToString().c_str()); | ||
} | ||
|
||
// Check for shutdown again before scheduling further compactions, | ||
// since we released and re-acquired the lock above | ||
if (shutdown_initiated_) { | ||
|
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.
Maybe add some comment here about how the db may be closed?
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.
Fixed