forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rare race condition on opening ephemeral copy
Summary: Fixes facebook#5079. So what happens was 1. Durable uploads CLOUDMANIFEST 2. Non-durable downloads CLOUDMANIFEST 3. Non-durable tried to open MANIFEST, couldn't find it locally nor in the cloud, assuming it's a new DB. 4. Durable uploads new MANIFEST 5. Non-durable wrote new epoch to its local CLOUDMANIFEST 6. Non-durable failed to open MANIFEST, restarts. At restart, it resuses its local CLOUDMANIFEST without compatible MANIFEST, goes into crash loop. If 3 and 4 reverses order, non-durable will be able to open the DB. This diff ensures that if this scenario occurs, non-durable will reinitializes the entire directory. Test Plan: added a unittest to describe such scenario. Reviewers: dhruba, igor Reviewed By: igor Differential Revision: https://rockset.phacility.com/D5571
- Loading branch information
Showing
4 changed files
with
127 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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