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

rafttest: reduce waitLeader flakiness #195

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

Commits on Apr 10, 2024

  1. rafttest: reduce waitLeader flakiness

    There are a few tests requiring a stable leader. For example,
    TestBasicProgress waits for a leader, submits 100 proposals, and expects
    that all 100 proposals are committed. In rare cases, a leader is
    elected, and the test proceeds, but in the meantime another node
    campaigns and wins a higher-term election. After this, some proposals
    end up not committed (legitimately), and the test fails.
    
    This commit modifies the waitLeader function with a better heuristic for
    a stable leader. It now waits until the leader has the highest term in
    the cluster, which more reliably (although not 100%) guarantees that
    there is no in-flight campaign that is about to win.
    
    Signed-off-by: Pavel Kalinnikov <[email protected]>
    pav-kv committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5535384 View commit details
    Browse the repository at this point in the history