-
Notifications
You must be signed in to change notification settings - Fork 497
Bottomless skip snapshot #1238
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
Bottomless skip snapshot #1238
Changes from all commits
5b40fdc
a2ee1e2
d2faf2f
dbc1dd5
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 |
|---|---|---|
|
|
@@ -924,7 +924,7 @@ pub async fn init_bottomless_replicator( | |
| match action { | ||
| bottomless::replicator::RestoreAction::SnapshotMainDbFile => { | ||
| replicator.new_generation().await; | ||
| if let Some(_handle) = replicator.snapshot_main_db_file().await? { | ||
| if let Some(_handle) = replicator.snapshot_main_db_file(true).await? { | ||
|
Contributor
Author
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. If we don't want to force snapshot generation after db restore, this should be changed to
Contributor
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. What is the benefit in creating a snapshot right after we restored from backup?
Contributor
Author
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. I'd say it's mostly related to forking, as I haven't tested if we don't get data loss if we won't snapshot after forking.
Contributor
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. We should probably snapshot explicitly after forking though, and not after other kind of restores |
||
| tracing::trace!("got snapshot handle after restore with generation upgrade"); | ||
| } | ||
| // Restoration process only leaves the local WAL file if it was | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
This is fairly important and could be counted as a bug fix on its own. It doesn't happen atm. (probably), but in general it could potentially cause DB to restore to empty state if we didn't manage to snapshot DB and WAL log was not present in current generation.