-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: maybe forget leader on (Pre)Vote requests
This patch will forget the Raft leader when receiving a (Pre)Vote request and finding the leader to be dead (according to liveness) or removed. This allows a quorum of replicas to campaign despite the PreVote+CheckQuorum condition if they independently conider the leader to be dead. A more targeted alternative was explored, where we forget the leader only when unquiescing to a dead leader. This would require changing the case where we steal leadership away from a Raft leader who can't heartbeat liveness during lease acquisitions to instead use TransferLeader, but this could cause unavailability due to races where multiple replicas request leader transfers and some are not up-to-date on the log. Furthermore, we would have to add logic to handle the mixed 23.1/23.2 state, since 23.1 nodes could otherwise be unable to obtain necessary prevotes. We instead choose to be lenient for now, and we can consider tightening the conditions later when we're more confident in the PreVote+CheckQuorum handling and may no longer need epoch leases. Epic: none Release note: None
- Loading branch information
1 parent
fefe74e
commit 9d0c7d8
Showing
3 changed files
with
49 additions
and
25 deletions.
There are no files selected for viewing
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
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
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