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

Delay the next campaign if the node lost the vote #169

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Mar 7, 2024

  1. Support customizing electionTick and heartbeatTick in rafttest

    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    feef14e View commit details
    Browse the repository at this point in the history
  2. Add a new 'tick' command to tick the specified interval

    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    bce704c View commit details
    Browse the repository at this point in the history
  3. added a test to demon a lag node will fail the vote

    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    326de20 View commit details
    Browse the repository at this point in the history
  4. Delay the next campaign if the node lost the vote

    Delay the next campaign if the node lost the vote. It's
    highly likely it will also lose next campaign, so it makes
    more sense to prioritize campaigns by other nodes within
    the current term.
    
    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    49311b0 View commit details
    Browse the repository at this point in the history
  5. Update the test vote.txt to demo the node being de-priotized on next …

    …campaign
    
    When a node lost the vote, it will be de-prioritized on the next campaign.
    Its randomized election timeout is in range [2*electionTime, 3*electionTime).
    
    Signed-off-by: Benjamin Wang <[email protected]>
    ahrtr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    800831c View commit details
    Browse the repository at this point in the history