Skip to content

test: stabilize concurrent cancellation test - #10461

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-grain-task-cancellation-hang
Aug 11, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-grain-task-cancellation-hang

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

GrainTaskMultipleCancellations can complete caller-side cancellation before one or more requests begin executing, while its delayed cases later require every request to have recorded cancellation inside the grain. Slower activation after mixed runtime tests exposes that mismatch as a five-minute wait for evidence which can never exist.

Add an interleaving start-notification path and wait until all delayed calls have entered the grain before scheduling cancellation. The zero-delay cases continue using the original path so pre-start cancellation remains covered, and the calls remain interleavable so concurrent cancellation behavior is preserved.

This completes the deterministic start barrier introduced for the single-call case in #10319.

Fixes #10432

Microsoft Reviewers: Open in CodeFlow

Wait until every delayed interleaving call has started before cancellation, so grain-side cancellation evidence is guaranteed to exist. Preserve immediate cancellation coverage for the zero-delay case.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ReubenBond
ReubenBond merged commit 2fe1759 into dotnet:main Aug 11, 2026
72 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-grain-task-cancellation-hang branch August 11, 2026 03:57
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: GrainTaskMultipleCancellations times out after mixed runtime tests

1 participant