Skip to content

Fix reactivation race in StatelessWorkerGrainContext#10016

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:fix/statelessworker-retired-reactivation-2
Apr 22, 2026
Merged

Fix reactivation race in StatelessWorkerGrainContext#10016
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:fix/statelessworker-retired-reactivation-2

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Apr 22, 2026

Copy link
Copy Markdown
Member

This PR fixes a reactivation race in StatelessWorkerGrainContext. The race is a theoretical corner case that we have not necessarily seen any instances of, but it was found while investigating something else and I wanted to fix it and clean things up while I was there.

  • Prevents StatelessWorkerGrainContext from processing incoming messages after it has unregistered itself from the catalog.
  • Reduces the memory footprint of StatelessWorkerGrainContext
  • Refactors GrainTypeSharedContext to remove a StatelessWorker-specific property.
  • Adds StatelessWorkerEvents for monitoring some events for testing purposes.
Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond enabled auto-merge April 22, 2026 22:37
@ReubenBond ReubenBond added this pull request to the merge queue Apr 22, 2026
Merged via the queue into dotnet:main with commit b7cfe09 Apr 22, 2026
60 checks passed
@ReubenBond ReubenBond deleted the fix/statelessworker-retired-reactivation-2 branch April 22, 2026 23:34
@github-actions github-actions Bot locked and limited conversation to collaborators May 24, 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.

1 participant