-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
br: ebs volume snapshot backup and restore with flashback solution #38700
Conversation
[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. |
/cc @3pointer |
/run check-issue-triage-complete |
br/pkg/restore/data.go
Outdated
return errors.Trace(err) | ||
} | ||
|
||
recovery.progress.Inc() |
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.
Could get region count by rangetask.TaskStat in the prepare phase and show progress in FlashbackToVersion
.
br/pkg/task/restore_data.go
Outdated
|
||
// restore tikv data from a snapshot volume | ||
var totalRegions int | ||
|
||
totalRegions, err = restore.RecoverData(ctx, resolveTs, allStores, mgr, progress) | ||
totalRegions, err = restore.RecoverData(ctx, resolveTs, allStores, mgr, progress, restoreTS, cfg.Concurrency) |
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.
it seems restoreTs
> resolveTs
. is it ok to stop gc at restoreTs
?
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.
keep safe point in restoreTs is safe since GC never work before the TiDB node startup. The code may need a refactoring to remove the safepointkeeper service, however, I would like to remove it after a thorough test.
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
This pull request has been accepted and is ready to merge. Commit hash: e501d50
|
/run-check_dev |
/run-check_dev_2 |
/run-check_dev |
/run-mysql-test |
9959021
to
e531b69
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e531b69
|
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Adapts Flashback solution.
previously, BR delete the key from rocks DB to get transaction level consistency, however, there is a defect when the compaction filter gc started after the restore was done. the data consistency is broken. v6.3.0 take a workaround compaction during the restore, this is too heavy. the flashback solution is to try to rewrite the MVCC key with the latest ts, it is more effective during the restore compared to compaction.
Issue Number: close #36215
Problem Summary:
What is changed and how it works?
Check List
Tests
Admin checksum show values are the same as backup's
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.