Skip to content

Fix stuck deactivation recovery#10046

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/stuck-deactivation-recovery
Apr 28, 2026
Merged

Fix stuck deactivation recovery#10046
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/stuck-deactivation-recovery

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Apr 28, 2026

Copy link
Copy Markdown
Member

Summary

  • abandon a deactivating activation once it crosses the stuck threshold by removing it from the local catalog and force-unregistering its directory entry
  • clear any unproven migration forwarding address before rerouting queued messages so they are re-addressed instead of forwarded to a target whose replacement activation might not exist
  • add a focused migration test which blocks deactivation behind a long-running request and verifies a new activation handles subsequent calls

Fixes #10045

Testing

  • dotnet test test\Orleans.DefaultCluster.Tests\Orleans.DefaultCluster.Tests.csproj --filter "FullyQualifiedName~StuckDeactivationRecoveryTests" --no-restore
  • dotnet test test\Orleans.DefaultCluster.Tests\Orleans.DefaultCluster.Tests.csproj --filter "FullyQualifiedName~DefaultCluster.Tests.General.MigrationTests|FullyQualifiedName~DefaultCluster.Tests.General.StuckDeactivationRecoveryTests" --no-restore
Microsoft Reviewers: Open in CodeFlow

Abandon deactivating activations once they exceed the stuck threshold so queued requests can be re-addressed instead of forwarding through stale migration state.

Add a migration test which blocks deactivation behind a long-running request and verifies the old activation is abandoned.

Fixes dotnet#10045

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond added this pull request to the merge queue Apr 28, 2026
Merged via the queue into dotnet:main with commit dad46bf Apr 28, 2026
62 checks passed
@ReubenBond ReubenBond deleted the fix/stuck-deactivation-recovery branch April 28, 2026 19:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 29, 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.

Stuck deactivating activation can retain stale routing state after migration

1 participant