Skip to content

CBG-5506 Fix flaky TestActiveReplicatorConflictPreUpgradedVersionOneSide#8457

Merged
torcolvin merged 1 commit into
mainfrom
CBG-5506-part2
Jul 15, 2026
Merged

CBG-5506 Fix flaky TestActiveReplicatorConflictPreUpgradedVersionOneSide#8457
torcolvin merged 1 commit into
mainfrom
CBG-5506-part2

Conversation

@torcolvin

Copy link
Copy Markdown
Collaborator

CBG-5506 Fix flaky TestActiveReplicatorConflictPreUpgradedVersionOneSide

Same race as #8392

Failure seen in CI:
Error: Not equal:
expected: "2-fa035b5a6ec210a7900bbb93f5d0ef58"
actual : "3-69608afddd88973491746801dc976cc6"
Error: Condition never satisfied
Test: .../versionVector/active_peer_has_post_upgrade_version_that_wins

from https://jenkins.sgwdev.com/job/MainIntegration/396/

Same race as the EachSide fix: ConflictResolvedLocalCount increments
before the CAS write commits, so GetDocument() right after
RequireWaitForStat could grab the pre-resolution rev, which then never
reaches rt2, timing out WaitForVersion. Poll the stat and the rev
change together instead.

Failure seen in CI:
    Error:  Not equal:
            expected: "2-fa035b5a6ec210a7900bbb93f5d0ef58"
            actual  : "3-69608afddd88973491746801dc976cc6"
    Error:  Condition never satisfied
    Test:   .../versionVector/active_peer_has_post_upgrade_version_that_wins

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes a CI-flaky legacy-revision conflict-resolution test by eliminating a race between a replicator stat increment and the underlying CAS write being fully committed/readable, aligning the approach with the earlier fix in #8392.

Changes:

  • Replaces RequireWaitForStat + immediate GetDocument read with a single require.EventuallyWithT loop that polls both the stat and the observed document version change.
  • Ensures the verPostConflictRes used for subsequent WaitForVersion calls is derived from a committed post-resolution write.

@torcolvin torcolvin merged commit 2627047 into main Jul 15, 2026
49 checks passed
@torcolvin torcolvin deleted the CBG-5506-part2 branch July 15, 2026 12:54
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.

3 participants