Skip to content

fix(streaming): await dropped client cleanup - #11260

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-10920-mysql-stream-timeout
Sep 15, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-10920-mysql-stream-timeout

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

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

Copilot AI lite review requested due to automatic review settings September 15, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (1)
What changed in this PR

Fixes dropped-client streaming cleanup by awaiting durable unregistration before completing cursor processing.

Changes:

  • Uses CancellationToken.None for 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.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request Current main Variance
Lines 81.63% (110,187 / 134,990) 81.61% (110,168 / 134,990) +0.0141 pp
Branches 70.49% (31,299 / 44,404) 70.51% (31,308 / 44,404) -0.0203 pp

Report-only conclusion: mixed.

The current-main baseline is commit 5efe793862 and uses the same reviewed coverage matrix.

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

Copilot AI review requested due to automatic review settings September 15, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review tier: Lite
Findings: None

Resolved since last review (1)

@ReubenBond
ReubenBond merged commit 59a8977 into dotnet:main Sep 15, 2026
129 of 131 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-10920-mysql-stream-timeout branch September 15, 2026 16:10
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 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.

MySQL dropped-client stream consumer test can time out

2 participants