Skip to content
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

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

3pointer
Copy link
Contributor

@3pointer 3pointer commented Dec 9, 2024

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.

@ti-chi-bot ti-chi-bot bot added the size/XXL label Dec 9, 2024
@3pointer 3pointer changed the title restore: support skip some keys due after certain timestamp restore: support skip some keys due before/after certain timestamp Jan 6, 2025
Copy link
Contributor

@Tristan1900 Tristan1900 left a 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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@ti-chi-bot ti-chi-bot bot removed the lgtm label Jan 7, 2025
Copy link
Member

@joccau joccau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot removed the lgtm label Jan 8, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 8, 2025
Copy link

ti-chi-bot bot commented Jan 8, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

ti-chi-bot bot commented Jan 8, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-06 03:55:25.912250626 +0000 UTC m=+153069.201082330: ☑️ agreed by YuJuncen.
  • 2025-01-07 06:54:43.162619643 +0000 UTC m=+250226.451451345: ☑️ agreed by BornChanger.
  • 2025-01-07 10:07:52.28466353 +0000 UTC m=+261815.573495236: ✖️🔁 reset by 3pointer.
  • 2025-01-07 11:01:53.642186543 +0000 UTC m=+265056.931018248: ☑️ agreed by YuJuncen.
  • 2025-01-08 03:52:45.964207344 +0000 UTC m=+325709.253039049: ☑️ agreed by joccau.
  • 2025-01-08 03:59:58.982174077 +0000 UTC m=+326142.271005782: ✖️🔁 reset by YuJuncen.
  • 2025-01-08 04:00:33.151112299 +0000 UTC m=+326176.439944005: ☑️ agreed by YuJuncen.
  • 2025-01-08 04:15:27.646536212 +0000 UTC m=+327070.935367917: ☑️ agreed by tangenta.

@YuJuncen YuJuncen merged commit 3b77f2c into pingcap:master Jan 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants