-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement partition store restore-from-snapshot #2353
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
693de9a
Validate object store uploads
pcholakov e67214c
Self-review updates
pcholakov 7e29fb8
Add SnapshotRepository::find_latest and wire up partition restore
pcholakov e23b784
Move files on import
pcholakov 37dc778
Stream snapshot files to disk, reusing read buffer
pcholakov 87f8745
Download snapshot data files concurrently
pcholakov 8812b62
Validate snapshot key range on import
pcholakov 1777ce2
Fixup lint
pcholakov c3b1ce2
Improve download file error handling
pcholakov 7a21108
Further PR feedback
pcholakov c56d2b1
Assert cluster_name on import
pcholakov 69b4a9a
Document & correctly handle local snapshot directory deletion
pcholakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ pub trait RocksAccess { | |
default_cf_options: rocksdb::Options, | ||
cf_patterns: Arc<[(BoxedCfMatcher, BoxedCfOptionUpdater)]>, | ||
) -> Result<(), RocksError>; | ||
/// Create a column family from a snapshot. The data files referenced by | ||
/// `metadata` will be moved into the RocksDB data directory. | ||
fn import_cf( | ||
&self, | ||
name: CfName, | ||
|
@@ -163,7 +165,7 @@ impl RocksAccess for rocksdb::DB { | |
let options = prepare_cf_options(&cf_patterns, default_cf_options, &name)?; | ||
|
||
let mut import_opts = ImportColumnFamilyOptions::default(); | ||
import_opts.set_move_files(false); // keep the snapshot files intact | ||
import_opts.set_move_files(true); | ||
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. Nice :-) |
||
|
||
Ok(Self::create_column_family_with_import( | ||
self, | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
That's a good check :-)