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

raft: don't propose config changes with regressed lead support #132150

Merged

Commits on Oct 16, 2024

  1. raft: rename confchange_v2_add_double_implicit to _single_

    The test was only adding a single node, so the name was misleading.
    
    Epic: None
    Release note: None
    nvanbenschoten committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    4471f23 View commit details
    Browse the repository at this point in the history
  2. raft: use 3x replication in confchange_v2_add_single_implicit

    This commit updates the confchange_v2_add_single_implicit test to start
    with 2 nodes so that the addition of a third voter does not regress the
    lead support and trip up the automatic transition out of the joint
    configuration.
    
    Epic: None
    Release note: None
    nvanbenschoten committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    415787d View commit details
    Browse the repository at this point in the history
  3. raft: don't propose config changes with regressed lead support

    Fixes cockroachdb#125355.
    
    If the lead support has not caught up from the previous configuration,
    we must not propose another configuration change. Doing so would
    compromise the lead support promise made by the previous configuration
    and used as an expiration of a leader lease. Instead, we wait for the
    lead support under the current configuration to catch up to the maximum
    lead support reached under the previous config. If the lead support is
    never able to catch up, the leader will eventually step down due to
    CheckQuorum.
    
    As a reminder, if we reject a config change, it will be reproposed again
    shortly, at which point the lead support will likely have caught up.
    
    As a second reminder, we fortify both voters and learners. We also
    always add new replicas as learners before promoting them to voters. The
    combination here means that a leader will commonly already be supported
    a voter when it is promoted added to the lead support computation.
    
    Release note: None
    nvanbenschoten committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    8105ddb View commit details
    Browse the repository at this point in the history