tikv
tikv copied to clipboard
Tracking Issue for Flashback
Background
Since we store all MVCC versions of every key in TiKV since the last GC point, we have the ability to restore any key in any given range to any of the existing specified MVCC versions. Providing such an interface whose name is kv_flashback_to_version allows for data recovery capabilities like the Flashback feature.
Task
- [x] Update https://github.com/pingcap/kvproto for the new gRPC interface. (https://github.com/pingcap/kvproto/pull/971)
- [x] Implement the
kv_flashback_to_versiongRPC interface. (https://github.com/tikv/tikv/pull/13378) - [x] Implement the
flashback_to_versionKV transaction command and action. (https://github.com/tikv/tikv/pull/13345) - [x] Reject any scheduling, reading, or writing request during the flashback. (https://github.com/tikv/tikv/pull/13348)
- [x] Wait for the latest last index to be committed and applied before the flashback. (https://github.com/tikv/tikv/pull/13348)
- [ ] Check the ResolvedTS during the preparation to make sure the flashback version is not greater than it. (https://github.com/tikv/tikv/pull/13412)
- [x] https://github.com/tikv/tikv/issues/13397
- [x] Re-implement the
flashback_to_versionKV transaction command to use MVCC overwriting. (https://github.com/tikv/tikv/pull/13450) - [ ] https://github.com/tikv/tikv/issues/13493
- [ ] https://github.com/tikv/tikv/issues/13519
/cc @husharp @Connor1996
Close since the basic Flashback ability has finished development.