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

Support 'flashback' request #569

Closed
Tracked by #37197
bb7133 opened this issue Aug 24, 2022 · 0 comments · Fixed by #578
Closed
Tracked by #37197

Support 'flashback' request #569

bb7133 opened this issue Aug 24, 2022 · 0 comments · Fixed by #578

Comments

@bb7133
Copy link

bb7133 commented Aug 24, 2022

Ref:

We plan to support an MVCC-based flashback feature for TiDB, as described in the issues above. The proposed RPC request:

message FlashbackToVersionRequest {
    Context context = 1;
    // The TS version which the data should flashback to.
    uint64 version = 2;
    bytes start_key = 3;
    bytes end_key = 4;
}

message FlashbackToVersionResponse {
    errorpb.Error region_error = 1;
    string error = 2;
}

We would like to implement the new interface based on it:

func flashback(keyRanges []kv.KeyRange, version int64) (status Status, err error)

In which:

  • keyRanges: a series of non-overlaped start/end key pairs that need to be flash-backed by TiKV.
  • version: the timestamp of MVCC version that need to be flash-backed by TiKV.
  • status: the status of flashback request: if TiKV is doing the flashback job, it returns the total number of regions and the number of done regions; if the job is not started by TiKV, it starts running the job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant