Skip to content

fix(durable-jobs): unregister running shards during shutdown - #11301

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-unregister-running-shards
Sep 17, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-unregister-running-shards

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #11273.

Canceled shard runners previously skipped unregistration, removed themselves from the local cache, and disposed their journals before Stop could release ownership. Normal unregistration also used the execution token, so shutdown could cancel an ownership update already in progress.

Keep unregistration with each runner after normal completion or expected execution cancellation. A separate cleanup token follows the shutdown deadline, allowing ownership release and empty-journal deletion to finish after execution stops. Existing error logging and final disposal remain in place, including for storage failures and independent cancellation.

Add deterministic regressions using real journal storage, fake time, and phase barriers for adopted future shards, queue-change waits, populated ownership release, empty-journal deletion, concurrent normal unregistration, shutdown deadlines, and cleanup failures. Document the graceful-shutdown cleanup boundary for provider retirement.

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings September 17, 2026 09:15
@ReubenBond
ReubenBond removed the request for review from Copilot September 17, 2026 09:16
@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 82.13% (112,289 / 136,713)
Branches 71.33% (32,310 / 45,295)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 3604a08, not current main 2e40fa8.

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

@ReubenBond
ReubenBond merged commit 0ba38cf into dotnet:main Sep 17, 2026
73 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-unregister-running-shards branch September 17, 2026 13:56
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 18, 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.

fix(durable-jobs): unregister running shards during graceful shutdown

1 participant