-
Notifications
You must be signed in to change notification settings - Fork 26
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: Return the timestamp of backup to cooperate with TiKV-CDC #138
Comments
cc @sunxiaoguang @haojinming @zeminzhou @ystaticy , PTAL~ |
There is gap between |
Emm you are right, I miss this. Actually I think this is the issue that how we implement backup in a running TiKV. (Incremental backup also need this). p.s. This scenario is very similar with CDC: How we know there is no data in the fly, or what's the minimal timestamp of the flying data. The |
ref tikv/migration#138, close #12989 Signed-off-by: haojinming <[email protected]> Co-authored-by: Ping Yu <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]>
* br return backupts Signed-off-by: haojinming <[email protected]> * add unit test and disable check-reqirements Signed-off-by: haojinming <[email protected]> * adjust parse place Signed-off-by: haojinming <[email protected]> * fix review comments Signed-off-by: haojinming <[email protected]> * change gcttl to duration Signed-off-by: haojinming <[email protected]>
Feature Request
Is your feature request related to a problem? Please describe:
TiKV-BR is designed to initialize data before the incremental data replication of TiKV-CDC. Refer to RawKV Cross Cluster Replication (tikv/rfcs#86).
To cooperate with TiKV-CDC, the procedure is expected to be:
1.1 Get a latest TSO (supposed to be
T0
).1.2 Set BR service safepoint to
T0
and TTL as 72 hours (configurable).1.3 Invoke backup procedure to TiKV, flush
causal_ts
at the beginning to make sure that timestamp of following writes must be greater thanT0
.1.4 Return the
T0
after backup finished.T0
in backup meta to remind the users agin after restore).--start-ts T0
.Update 2022.6.29
Set
T0
asTSO - safe-interval
. Wheresafe-interval
is a configurable duration defaults to 1 minute.safe-interval
is a work around to avoid missing some RawKV writes just in Raft procedure during backup, and assume that all Raw writes should be finished in 1 minute.The cons of
safe-interval
is that some entries would be backup or replicated redundantly.On a system with heavy load, the
safe-interval
should be configured longer.The
safe-interval
would be deprecated after theread-ts
of RawKV is implemented. Refer to tikv/rfcs#96.Describe the feature you'd like:
1.1 ~ 1.4 in above description.
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: