Repository navigation
De-flake RollingUpdateShardAllocationSpec - #8370
Merged
Aaronontheweb merged 2 commits intoJul 12, 2026
Merged
Aaronontheweb merged 2 commits into
Aaronontheweb merged 2 commits into
Conversation
The spec's no-duration AwaitAssert{Tell;ExpectMsg} sites shared a 5s outer window with a 5s inner ExpectMsg timeout, so each site got only one attempt on the shared TestActor mailbox, and late replies from timed-out attempts could pollute the next read. The fix asyncifies the spec and gives every such site a fresh TestProbe per attempt, a bounded inner expect, and an explicit retry interval, following the pattern already used in ClusterShardingRolePartitioningSpec.
Aaronontheweb
commented
Jul 12, 2026
| var probe = CreateTestProbe(); | ||
| shardRegion.Value.Tell(GetCurrentRegions.Instance, probe.Ref); | ||
| (await probe.ExpectMsgAsync<CurrentRegions>(TimeSpan.FromSeconds(3))).Regions.Should().HaveCount(3); | ||
| }, TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(1)); |
Member
Author
There was a problem hiding this comment.
primary fix - gives the internal loop more changes to re-query the ShardRegion. This was busted before to some extent.
Aaronontheweb
enabled auto-merge (squash)
July 12, 2026 13:39
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.
Fixes the Windows MNTR flake seen on #8368's validation run (unrelated to that PR's Artery-only diff).
The spec's no-duration
AwaitAssert { Tell; ExpectMsg }sites inherit a 5-second window with a 5-second inner expect — outer equals inner, so every site is effectively one attempt on the shared TestActor mailbox, and a late reply from a timed-out attempt pollutes the next read. A region whose coordinator is mid-handoff also replies toGetCurrentRegionsinstantly with an empty set, which is the "expected 3, found 0" failure. The UpMembers check raced simultaneous join+leave gossip convergence in a bare 5 seconds.Same fix pattern as #8363, applied to all seven sites: fresh probe per attempt, bounded 3-second inner expect, explicit 1-second interval, 30-second windows; spec asyncified to the async TestKit APIs. No assertions weakened. Passes 3/3 locally (~19s per run).
Side-find filed separately as #8369 (the spec's config block nests two settings into dead keys) — deliberately not bundled here.