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

add ForgetLeader #78

Merged
merged 3 commits into from
Jun 26, 2023
Merged

add ForgetLeader #78

merged 3 commits into from
Jun 26, 2023

Commits on Jun 23, 2023

  1. rafttest: add log-level argument for stabilize

    Signed-off-by: Erik Grinaker <grinaker@cockroachlabs.com>
    erikgrinaker committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    26ce926 View commit details
    Browse the repository at this point in the history
  2. rafttest: show term and leader for raft-state

    Signed-off-by: Erik Grinaker <grinaker@cockroachlabs.com>
    erikgrinaker committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    09ea4c5 View commit details
    Browse the repository at this point in the history
  3. add ForgetLeader

    This patch adds `ForgetLeader()`, which causes a follower to forget its
    current leader, changing it to None. It remains a leaderless follower in
    the current term, without campaigning.
    
    This is particularly useful with PreVote+CheckQuorum, if the caller has
    strong reason to believe the leader is dead, since it will grant
    prevotes but also revert to follower if it hears from the leader. A
    quorum of such leaderless followers can thus allow a pre-candidate to
    hold an election if they believe the leader to be dead.
    
    Signed-off-by: Erik Grinaker <grinaker@cockroachlabs.com>
    erikgrinaker committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    1159466 View commit details
    Browse the repository at this point in the history