tikv icon indicating copy to clipboard operation
tikv copied to clipboard

Tracking Issue for Flashback

Open JmPotato opened this issue 3 years ago • 1 comments

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_version gRPC interface. (https://github.com/tikv/tikv/pull/13378)
  • [x] Implement the flashback_to_version KV 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_version KV 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

JmPotato avatar Aug 18 '22 05:08 JmPotato

/cc @husharp @Connor1996

JmPotato avatar Aug 18 '22 05:08 JmPotato

Close since the basic Flashback ability has finished development.

JmPotato avatar Nov 09 '22 08:11 JmPotato