-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
log-backup: support calculating dynamic shift-start-ts when restoring kv-files belonging to default-cf #36089
Conversation
Signed-off-by: joccau <zak.zhao@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/draft |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/9f7c35ffc4626278a91c69adfe0419c87dd945e6 |
/run-all-tests |
Signed-off-by: joccau <zak.zhao@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
/run-all-tests |
Signed-off-by: joccau <zak.zhao@pingcap.com>
/cc @Leavrth |
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
Signed-off-by: joccau <zak.zhao@pingcap.com>
/run-all-tests |
/run-unit-test |
… kv-files belonging to default-cf (pingcap#36089) * print the size and kv count of truncated log Signed-off-by: joccau <zak.zhao@pingcap.com> * calculate shift start ts Signed-off-by: joccau <zak.zhao@pingcap.com> * skip invalid meta file Signed-off-by: joccau <zak.zhao@pingcap.com> * summary restore log about size and kv-count Signed-off-by: joccau <zak.zhao@pingcap.com> * set service-safe-point with global-checkpoint-ts-1 Signed-off-by: joccau <zak.zhao@pingcap.com> * make fmt Signed-off-by: joccau <zak.zhao@pingcap.com> * add test case Signed-off-by: joccau <zak.zhao@pingcap.com> * deal comments in pr Signed-off-by: joccau <zak.zhao@pingcap.com> * fix typo Signed-off-by: joccau <zak.zhao@pingcap.com> * maintain test case Signed-off-by: joccau <zak.zhao@pingcap.com> * fix typo Signed-off-by: joccau <zak.zhao@pingcap.com> * make build Signed-off-by: joccau <zak.zhao@pingcap.com>
What problem does this PR solve?
Issue Number: close #36138
Problem Summary:
What is changed and how it works?
Check List
Tests
Manual test
test1
br log start
br restore point
shift-start-ts
[2022/07/11 23:13:45.818 +08:00] [INFO] [client.go:301] ["set restore range ts"] [shift-start-ts=434516138702667777] [start-ts=434516875680940033] [restored-ts=434517233926930433]
test2
br log truncate --until=434516875680940033
Reading Metadata... DONE; take = 450.577875ms
We are going to remove 51 files, until 2022-07-11 22:38:57.5280.
Sure? (y/N) y
Removing metadata... DONE; take = 495.779542ms
Clearing data files done. kv-count = 174, totalSize = 18722DONE; take = 127.192625ms
[2022/07/12 12:54:53.754 +08:00] [WARN] [stream_metas.go:70] ["calculate shift-ts"] [start-ts=434516875680940033] [shift-ts=434516138702667777]
br restore point
log truncate
the restore summary:
[2022/07/11 23:13:48.274 +08:00] [INFO] [collector.go:69] ["restore log success summary"] [total-take=4.90154525s] [restore-from=434516875680940033] [restore-to=434517233926930433] [total-kv-count=10] [total-size=820]
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.