-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
raft: forget the leader when stepping down if it's safe #134990
base: master
Are you sure you want to change the base?
Commits on Nov 22, 2024
-
raft: start bcasting defortification messages when stepping down
Right now, we start bcasting defortificaton messages at heartbeat timeouts. However, there is nothing that prevents us from starting this process even earlier. This commit starts this process when stepping down immediately after becoming a follower. Epic: None Release notes: None
Configuration menu - View commit details
-
Copy full SHA for 467edd0 - Browse repository at this point
Copy the full SHA 467edd0View commit details -
raft: allow forgetting the leader within the same term
This commit allows us to forget the leader when stepping down. We can't just call `r.resetLead()` inside `r.reset()` because it would defortify in all places where we stepdown to the same term. Once we make it safe in all places to stepdown to the same term and forget the leader, we can call r.resetLead() inside r.reset(). Epic: None Release note: None
Configuration menu - View commit details
-
Copy full SHA for 89f0563 - Browse repository at this point
Copy the full SHA 89f0563View commit details -
raft: forget the leader when stepping down from CheckQuorum
In checkQuorum, if we decide to step down, it means that a majority of replicas don't support us. Therefore, it's safe to step down and forget that we were the leader at this term. We can safely campaign and participate in elections. Epic: None Release note: None
Configuration menu - View commit details
-
Copy full SHA for 5aa9da7 - Browse repository at this point
Copy the full SHA 5aa9da7View commit details -
raft: forget the leader when transferring leadership
Since leadership transfer means that the current leader instructs another replica to campaign without performing safety checks. It should be safe to forget the leader when stepping down. Epic: None Release note: None
Configuration menu - View commit details
-
Copy full SHA for e7baa61 - Browse repository at this point
Copy the full SHA e7baa61View commit details -
raft: forget the leader when a leader becomes a learner
When a current leader becomes a learner, it should be safe to step down and forget that we were the leader at the current term because: (1) learners can't campaign or participate in elections, and (2) in order for a learner to become a voter again, a new leader needs to get elected and propose that change, which means that the replica would be able to safely participate in elections then. Epic: None Release note: None
Configuration menu - View commit details
-
Copy full SHA for 1fdb01a - Browse repository at this point
Copy the full SHA 1fdb01aView commit details -
raft: forget the leader after a restart if we were the leader
This commit makes us forget that we were the leader at this term after a restart. Epic: None Release notes: None
Configuration menu - View commit details
-
Copy full SHA for f4b5705 - Browse repository at this point
Copy the full SHA f4b5705View commit details -
raft: forget the leader when stepping down after a VoteLost
We already forget the leader when attempting to campaign. This commit doesn't change any current behaviour. Epic: None Release notes: None
Configuration menu - View commit details
-
Copy full SHA for 1468e03 - Browse repository at this point
Copy the full SHA 1468e03View commit details