Repository navigation
Mark recovery_in_prog_ to false whenever recovery thread joins - #11890
Closed
jowlyzhang wants to merge 2 commits into
Closed
jowlyzhang wants to merge 2 commits into
jowlyzhang wants to merge 2 commits into
Conversation
anand1976
approved these changes
Sep 26, 2023
anand1976
left a comment
Contributor
There was a problem hiding this comment.
Good catch. Thanks for fixing it!
Contributor
|
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Author
Thank you for the quick review! |
Contributor
|
@jowlyzhang merged this pull request in 7ea6e72. |
ajkr
pushed a commit
that referenced
this pull request
Oct 19, 2023
Summary: Make the `RecoverFromRetryableBGIOError` function always mark `recovery_in_prog_` to false when it returns. Otherwise, in below code snippet, when db closes and the `error_handler_.CancelErrorRecovery()` call successfully joined the recovery thread, the immediately following while loop will incorrectly think the error recovery is still in progress and loops in `bg_cv_.Wait()`. https://github.com/facebook/rocksdb/blob/1c871a4d8682ea260ba3b18ed43cd525a2141733/db/db_impl/db_impl.cc#L542-L545 This is the issue #11440 Pull Request resolved: #11890 Reviewed By: anand1976 Differential Revision: D49624216 Pulled By: jowlyzhang fbshipit-source-id: ee10cf6527d95b8dd4705a326eb6208d741fe002
Tim-Reed
pushed a commit
to Tim-Reed/rocksdb
that referenced
this pull request
Oct 1, 2026
…11890) Summary: Make the `RecoverFromRetryableBGIOError` function always mark `recovery_in_prog_` to false when it returns. Otherwise, in below code snippet, when db closes and the `error_handler_.CancelErrorRecovery()` call successfully joined the recovery thread, the immediately following while loop will incorrectly think the error recovery is still in progress and loops in `bg_cv_.Wait()`. https://github.com/facebook/rocksdb/blob/532d907d7f90ca621b4cd64b2a334eb18a594fd0/db/db_impl/db_impl.cc#L542-L545 This is the issue meta#11440 Pull Request resolved: meta#11890 Reviewed By: anand1976 Differential Revision: D49624216 Pulled By: jowlyzhang fbshipit-source-id: ee10cf6527d95b8dd4705a326eb6208d741fe002
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the
RecoverFromRetryableBGIOErrorfunction always markrecovery_in_prog_to false when it returns.Otherwise, in below code snippet, when db closes and the
error_handler_.CancelErrorRecovery()call successfully joined the recovery thread, the immediately following while loop will incorrectly think the error recovery is still in progress and loops inbg_cv_.Wait().https://github.com/facebook/rocksdb/blob/1c871a4d8682ea260ba3b18ed43cd525a2141733/db/db_impl/db_impl.cc#L542-L545
This is the issue #11440