Skip to content

Commit 33f2069

Browse files
ReubenBondCopilot
andcommitted
fix(runtime): unregister shutdown activations from directory
Directory-backed activations deactivated during silo shutdown now unregister once deactivation completes, preventing lookups from resolving to stale activation targets after the catalog target has been removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 756d3d2 commit 33f2069

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/Orleans.Runtime/Catalog/ActivationData.cs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,9 +2001,8 @@ private async Task FinishDeactivating(Command.Deactivate deactivateCommand, Canc
20012001

20022002
// If the instance is being deactivated due to a directory failure, we should not unregister it.
20032003
var isDirectoryFailure = DeactivationReason.ReasonCode is DeactivationReasonCode.DirectoryFailure;
2004-
var isShuttingDown = DeactivationReason.ReasonCode is DeactivationReasonCode.ShuttingDown;
20052004

2006-
if (!migrating && IsUsingGrainDirectory && !cancellationToken.IsCancellationRequested && !isDirectoryFailure && !isShuttingDown)
2005+
if (!migrating && IsUsingGrainDirectory && !cancellationToken.IsCancellationRequested && !isDirectoryFailure)
20072006
{
20082007
// Unregister from directory.
20092008
// If the grain was migrated, the new activation will perform a check-and-set on the registration itself.

0 commit comments

Comments
 (0)