Skip to content

Stronger preconditions before calling wait_for_commit - expect primary unanimity#7705

Merged
achamayou merged 2 commits intomicrosoft:mainfrom
eddyashton:wait_for_commit_sync_preconditions
Mar 5, 2026
Merged

Stronger preconditions before calling wait_for_commit - expect primary unanimity#7705
achamayou merged 2 commits intomicrosoft:mainfrom
eddyashton:wait_for_commit_sync_preconditions

Conversation

@eddyashton
Copy link
Member

See explanatory comment here: #7702 (comment)

Should resolve #7702 and #7687.

Copilot AI review requested due to automatic review settings March 5, 2026 11:11
@eddyashton eddyashton requested a review from a team as a code owner March 5, 2026 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens test preconditions around elections by requiring primary unanimity before proceeding to commit synchronisation, addressing flaky “Multiple commit values” failures seen after leadership changes/suspensions.

Changes:

  • Add a wait_for_primary_unanimity() barrier after force_become_primary() transitions, ensuring all nodes converge on the same primary.
  • Replace wait_for_new_primary_in(...) with wait_for_primary_unanimity() in snapshot-selection tests before calling wait_for_node_commit_sync().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/partitions_test.py After forcing a new primary, wait for all nodes to agree on the primary before continuing.
tests/e2e_operations.py After resuming suspended nodes, wait for primary unanimity before commit sync to reduce election/commit skew flakiness.

@achamayou achamayou merged commit 7ad876c into microsoft:main Mar 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Election failed in snapshot test

4 participants