-
Notifications
You must be signed in to change notification settings - Fork 221
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
restore: support skip some keys due before/after certain timestamp #1283
Conversation
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.
Just a one minor suggestion!
@@ -140,7 +140,12 @@ message SSTMeta { | |||
message RewriteRule { | |||
bytes old_key_prefix = 1; | |||
bytes new_key_prefix = 2; | |||
// (Optional) Rewrite all keys in the range to use this timestamp. |
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.
A suggestion, since all of these are optional, can we put them into a new message like RewriteSkipRule
or something. feels like we can easily check on its optional state in the code and could be cleaner.
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.
Need to consider compatibility if we move new_timestamp
to new place.
I would like to keep it simple. until there need more field in future.
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BornChanger, joccau, tangenta, YuJuncen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
For some special download, we need to skip rewrite some keys because the timestamp is not in a target range.
This PR tried to add more rule about the restore phase.
When set the
ignore_after_timestamp
the sst will trigger the rewrite phase and skip the keys that has a timestamp > this fileld. no matter it's default or write cf.When set the
ignore_before_timestamp
the sst will trigger the rewrite phase and skip the keys that has a timestamp < this fileld. on write cf.