This repository was archived by the owner on Oct 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Bart/bottomless point in time recovery #484
Merged
psarna
merged 15 commits into
libsql:main
from
Horusiath:bart/bottomless-point-in-time-recovery
Jul 3, 2023
Merged
Bart/bottomless point in time recovery #484
psarna
merged 15 commits into
libsql:main
from
Horusiath:bart/bottomless-point-in-time-recovery
Jul 3, 2023
Conversation
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
…io-native implementation
…mless-point-in-time-recovery
psarna
approved these changes
Jul 3, 2023
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.
looks good, one nitpick that can be done as a follow-up
match verify.to_lowercase().as_ref() { | ||
"yes" | "true" | "1" | "y" | "t" => options.verify_crc = true, | ||
"no" | "false" | "0" | "n" | "f" => options.verify_crc = false, | ||
_ => { /* unknown option */ } |
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.
nitpick: let's tracing::warn
in that case to let the user know something's wrong -- by printing whatever the user passed and the legal values
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds a point-in-time recovery capabilities to bottomless CLI. We can add optional ute-time argument to provide the last time up to which them PITR should take place. This mechanism uses checkpoint UUID v7 generations to pick up the last machine generation to recover first, then it traverses over the frame batch files and filters them by AWS Last-Modified metadata in order to stop frames at a given time.
The consideration here is that Last-Modified timestamp may not be what users expect. Additionally it marks a time when file had been sent to S3, not the time when checkpoint backup was made: ie. when we stored WAL frames in local file system, but didn't managed to send them right away, but rather during the restore process, they won't be included in overall restore state. In such cases we could include timestamps in file/S3 object names.