-
Notifications
You must be signed in to change notification settings - Fork 215
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
Adding a propose request vote message to speed up some reconfigurations #5697
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
propose_vote_request@76920 aka 20231004.43 vs main ewma over 20 builds from 76474 to 76915 Click to see tablemain
propose_vote_request
|
achamayou
changed the title
Initial draft of a propose request vote message
Adding a propose request vote message to speed up reconfigurations
Sep 29, 2023
achamayou
changed the title
Adding a propose request vote message to speed up reconfigurations
Adding a propose request vote message to speed up some reconfigurations
Sep 29, 2023
lemmy
reviewed
Sep 30, 2023
lemmy
reviewed
Sep 30, 2023
eddyashton
reviewed
Oct 2, 2023
eddyashton
approved these changes
Oct 2, 2023
… into propose_vote_request
heidihoward
reviewed
Oct 4, 2023
heidihoward
reviewed
Oct 4, 2023
heidihoward
reviewed
Oct 4, 2023
heidihoward
approved these changes
Oct 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this change is to speed up code updates by skipping the election timeout, but extends more generally to any reconfiguration in which the primary is retired. Instead of waiting for a node in the next configuration to time out, the retiring primary can nudge a plausible candidate [*] to their succession.
[*] Plausible is currently defined as having the highest match index, with a tie breaker on belonging to a comparatively most recent configuration. This favours the "quickest/most up to date" node, even though it may itself be about to retire, because it has the best chances of winning the election and can itself do another quick handover later.
An alternative heuristic, discussed in comment, would be to prioritise nodes in the latest configuration, even if they aren't as up to date, so long as they are at least up to date enough to potentially win an election. I suspect this would be a worse choice, because it leads to greater chances of a multi-round election.
Quick comparison with the rotation test, doing two leader retirements in a row:
Without:
With: