-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: improve flashback to timestamp
, let it compatible with TiCDC
#39442
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. |
flashback to timestamp
, let it compatible with TiCDC
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.
for backup restore:
flashback version = resolvedTs
startTs = restoreTs - 1
commitTs = restoreTs
@@ -57,7 +57,7 @@ func RecoverData(ctx context.Context, resolveTS uint64, allStores []*metapb.Stor | |||
return totalRegions, errors.Trace(err) | |||
} | |||
|
|||
if err := recovery.PrepareFlashbackToVersion(ctx); err != nil { | |||
if err := recovery.PrepareFlashbackToVersion(ctx, resolveTS, restoreTS-1); err != nil { |
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.
Can we guarantee that no other write on restoreTS-1
? Otherwise, it may overwrite the old value.
/cc @fengou1
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.
Yes, In EBS restore. workflow as follows
- start pd
- set pd/tikv recoverymode
- start tikv
- prepare/flashback version
- start tidb
there is no chance to write any data before step 5 (start tidb)
/hold |
merge it after tikv/tikv#13823 merged |
/unhold |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 8ee78c6
|
TiDB MergeCI notify✅ Well Done! New fixed [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref tikv/tikv#13823
Problem Summary:
startTS
andflashbackTS
in prepare phase, let it compatible with TiCDC.pd schedule
params.What is changed and how it works?
Check List
Tests
use the tikv-server with server, storage: make flashback compatible with resolved_ts tikv/tikv#13823 patch. It works well.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.