Repository navigation
De-flake ClusterShardingSpec recovery phase: keep barriers out of Within - #8406
Merged
Merged
Conversation
One WithinAsync(50s) spanned five barriers plus an unbounded ExpectMsgAsync, so a slow remember-entities recovery drained the shared budget and the final barrier's timeout clamped to zero. Bound the recovery check in a retrying probe-per-attempt AwaitAssert and move the barriers outside the Within so each gets the full barrier-timeout.
The remaining Within(50s) still wrapped three barriers and bounded steps whose worst cases sum past it. Every wait now carries its own explicit bound; all five barriers run outside any Within.
Aaronontheweb
commented
Jul 18, 2026
Aaronontheweb
left a comment
Member
Author
There was a problem hiding this comment.
LGTM- makes sense to keep the barriers out of the long-running cluster sharding operations
Aaronontheweb
enabled auto-merge (squash)
July 18, 2026 13:05
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.
In the recover-entities-upon-restart phase, one WithinAsync(50s) spanned five barriers and the final Get(1) expect was unbounded, so it inherited the phase's remaining budget. A slow remember-entities recovery stalled that expect for most of the 50s, and EnterBarrier then derived its timeout from the Within remainder — clamped to zero — failing after-12 instantly on every node of a healthy cluster (build 129150, Linux MNTR, DData entity-recovery variant). Pekko's identical structure survives only because JVM within() dilates by timefactor; Akka.NET's Within does not.
This bounds the recovery check in a retrying probe-per-attempt AwaitAssert, gives every wait in the phase its own explicit bound, and removes the phase's outer Within entirely — all five barriers now run outside any Within so each rendezvous gets the full testconductor barrier-timeout instead of a starved remainder.