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

Remove wait_apply stage in disk snapshot restore #50312

Closed
YuJuncen opened this issue Jan 11, 2024 · 0 comments · Fixed by #50316
Closed

Remove wait_apply stage in disk snapshot restore #50312

YuJuncen opened this issue Jan 11, 2024 · 0 comments · Fixed by #50316
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@YuJuncen
Copy link
Contributor

YuJuncen commented Jan 11, 2024

Enhancement

The wait_apply stage in disk snapshot restore was used for preparing "physical" flashback, which delete all entries committed after the flashback TS directly in each peers underlying storage (RocksDB), without any synchronization by raft.
For keeping the consistency of the raft state machine, we must wait all peers' state machine go to the same state.

But for now, the flashback implementation should be the same as FLASHBACK TABLE SQL statement, which will "logically" delete the keys needed to be flashed back by committing new writes with raft. Hence it is no need to wait all peers(but only leaders) apply to last index.

We can remove the useless step. Given it have brought other bugs, like make backup stuck if there are some stale peers.

@YuJuncen YuJuncen added the type/enhancement The issue or PR belongs to an enhancement. label Jan 11, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in bf8d474 Jan 16, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jan 17, 2024
YuJuncen added a commit to ti-chi-bot/tidb that referenced this issue Feb 20, 2024
guoshouyan pushed a commit to guoshouyan/tidb that referenced this issue Mar 5, 2024
…pingcap#36)

close pingcap#50312, close pingcap#50315

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
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
Development

Successfully merging a pull request may close this issue.

1 participant