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

Do not reset the electionElapsed if the node doesn't grant vote #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Feb 21, 2024

  1. Do not reset the electionElapsed if the node doesn't grant vote

    If the local node receives a MsgVote message with higher
    term but it doesn't grant the vote; it turns into a follower,
    but it shouldn't reset the electionElapsed, to ensure it
    has higher priority to start a campaign in the next round
    of election. If we reject a node, it's highly likely we
    will reject it again if it immediately campaigns again.
    So it may waste a long time to elect a leader if we reset
    the electionElapsed.
    
    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    2299701 View commit details
    Browse the repository at this point in the history