CBG-5506 Fix flaky TestActiveReplicatorConflictPreUpgradedVersionOneSide#8457
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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+ immediateGetDocumentread with a singlerequire.EventuallyWithTloop that polls both the stat and the observed document version change. - Ensures the
verPostConflictResused for subsequentWaitForVersioncalls is derived from a committed post-resolution write.
gregns1
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/