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

Clean up and improve snapshot handling #124

Open
erikgrinaker opened this issue Jan 9, 2024 · 0 comments
Open

Clean up and improve snapshot handling #124

erikgrinaker opened this issue Jan 9, 2024 · 0 comments
Milestone

Comments

@erikgrinaker
Copy link
Contributor

erikgrinaker commented Jan 9, 2024

In #110, we made some minor changes to snapshot handling, which removed the main use of Progress.PendingSnapshot. As described in #110 (comment), we should now be able to remove PendingSnapshot completely, and take the opportunity to clean up some of the related state transitions.

Also, as described in cockroachdb/cockroach#87583 and #110 (comment), we should modify ReportSnapshot() and MsgSnapStatus to take the index of the applied snapshot -- in the common case, this will be the same as that in MsgSnap, but complex systems (e.g. CockroachDB) may generate and apply snapshots at a different index than that requested by Raft (e.g. to send snapshots from a follower in the same region), and reporting back the actual index would simplify the logic and e.g. allow updating Match and transitioning directly to StateReplicate in this case.

These are all breaking changes to public APIs, so would have to be done for 4.0. There are possibly other related cleanups that could be made as well.

@pav-kv @ahrtr Please add any further ideas and context as needed.

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

No branches or pull requests

2 participants