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

Tracking Issue for Flashback #13303

Closed
10 tasks done
JmPotato opened this issue Aug 18, 2022 · 2 comments
Closed
10 tasks done

Tracking Issue for Flashback #13303

JmPotato opened this issue Aug 18, 2022 · 2 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@JmPotato
Copy link
Member

JmPotato commented Aug 18, 2022

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

@JmPotato JmPotato added the type/enhancement The issue or PR belongs to an enhancement. label Aug 18, 2022
@JmPotato
Copy link
Member Author

/cc @HuSharp @Connor1996

ti-chi-bot added a commit that referenced this issue Aug 30, 2022
ref #13303

Implement the `FlashbackToVersion` txn command, which contains two phases: 
`command::FlashbackToVersionReadPhase` and `command::FlashbackToVersion`.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot added a commit that referenced this issue Sep 2, 2022
ref #13303

Add Msg and peer's flashback state field

Signed-off-by: husharp <jinhao.hu@pingcap.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit that referenced this issue Sep 2, 2022
ref #13303

Implement the `kv_flashback_to_version` interface.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot pushed a commit that referenced this issue Sep 19, 2022
ref #13303, close #13448

Since deleting the old MVCC keys directly will cause the GC Compaction Filter to mishandle the deletion entry,
this PR refactors the `FlashbackToVersionReadPhase` and `FlashbackToVersion` commands to use the MVCC
overwriting to achieve the flashback.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
JmPotato added a commit to JmPotato/tikv that referenced this issue Sep 19, 2022
ref tikv#13303, close tikv#13448

Since deleting the old MVCC keys directly will cause the GC Compaction Filter to mishandle the deletion entry,
this PR refactors the `FlashbackToVersionReadPhase` and `FlashbackToVersion` commands to use the MVCC
overwriting to achieve the flashback.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot added a commit that referenced this issue Sep 20, 2022
ref #13303

Use `load_data` to get the old value in flashback to prevent unnecessary `seek_write`.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
@JmPotato JmPotato changed the title Add kv_flashback_to_version interface Tracking Issue for Flashback Sep 22, 2022
ti-chi-bot added a commit that referenced this issue Sep 26, 2022
ref #13303

Use `ReaderWithStats` in `flashback_to_version` command to collect the statistics info as much as possible.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit that referenced this issue Oct 12, 2022
…k state. (#13541)

ref #13303, ref #13519

Add a Raft admin command to put the region into a lock state to prevent any reading, writing, and scheduling and persist the state in the RegionLocalState.

Signed-off-by: husharp <jinhao.hu@pingcap.com>
ti-chi-bot pushed a commit that referenced this issue Oct 17, 2022
…3618)

ref #13303, ref pingcap/tidb#38475

Move `check_flashback_state` to after `check_region_epoch` to make sure the Region Cache on the client-side could be refreshed ASAP.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot added a commit that referenced this issue Oct 18, 2022
ref #13303

Refine the flashback raftstore test.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
@JmPotato
Copy link
Member Author

JmPotato commented Nov 9, 2022

Close since the basic Flashback ability has finished development.

@JmPotato JmPotato closed this as completed Nov 9, 2022
ti-chi-bot added a commit that referenced this issue Nov 17, 2022
ref #13303

Refine the raftstore flashback tests.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot added a commit that referenced this issue Nov 23, 2022
ref #13303

remove redundant code for prewrite and commit.

Signed-off-by: husharp <jinhao.hu@pingcap.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this issue Jun 1, 2023
…4859)

ref #13303, close pingcap/tidb#44292

During the Flashback process, we should prevent any read or write operations on the in-memory pessimistic lock table
and clear it like rolling back other locks to ensure that Flashback can proceed smoothly.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Jun 1, 2023
ref tikv#13303, close pingcap/tidb#44292

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Jun 1, 2023
ref tikv#13303, close pingcap/tidb#44292

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this issue Jun 5, 2023
…4859) (#14861)

ref #13303, ref #14859, close pingcap/tidb#44292

During the Flashback process, we should prevent any read or write operations on the in-memory pessimistic lock table
and clear it like rolling back other locks to ensure that Flashback can proceed smoothly.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this issue Jun 16, 2023
…4859) (#14862)

ref #13303, ref #14859, close pingcap/tidb#44292

During the Flashback process, we should prevent any read or write operations on the in-memory pessimistic lock table
and clear it like rolling back other locks to ensure that Flashback can proceed smoothly.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
tonyxuqqi pushed a commit to tonyxuqqi/tikv that referenced this issue Jun 22, 2023
…kv#14859)

ref tikv#13303, close pingcap/tidb#44292

During the Flashback process, we should prevent any read or write operations on the in-memory pessimistic lock table
and clear it like rolling back other locks to ensure that Flashback can proceed smoothly.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: tonyxuqqi <tonyxuqi@outlook.com>
ti-chi-bot bot pushed a commit that referenced this issue Jul 4, 2023
…14986)

ref #13303, ref pingcap/tidb#44292

Make `test_flashback_with_in_memory_pessimistic_locks` stable.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
1 participant