Repository navigation
fix(streaming): await dropped client cleanup - #11260
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The regression test does not assert the committed CancellationToken.None argument.
Get a fresh assessment by requesting another Copilot review.
Review tier: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes dropped-client streaming cleanup by awaiting durable unregistration before completing cursor processing.
Changes:
- Uses
CancellationToken.Nonefor committed cleanup. - Adds regression coverage for cleanup ordering and subscription identity.
| File | Reviewed changes |
|---|---|
test/Orleans.Streaming.Tests/StreamingTests/PersistentStreamPullingAgentTests.cs |
Adds cleanup lifecycle regression coverage. |
src/Orleans.Streaming/PersistentStreams/PersistentStreamPullingAgent.cs |
Awaits dropped-client unregistration before cursor completion. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage
Report-only conclusion: mixed. The current-main baseline is commit Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |

Fixes #10920.
When a persistent stream delivery detects that a client consumer is unavailable, the pulling agent starts durable pub/sub unregistration and immediately finishes the consumer cursor. Because that operation is fire-and-forget, cleanup failures are detached from the cursor lifecycle and the dropped subscription can remain registered, causing lifecycle waits to time out.
Await dropped-client unregistration before completing the cursor and use a non-cancelable token for the committed cleanup boundary. Add a focused pulling-agent regression which verifies the exact subscription is unregistered and that cursor processing remains active until durable cleanup completes.
Microsoft Reviewers: Open in CodeFlow