Skip to content

fix: collect idle migrated grain activations - #11365

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-migrated-grain-deactivation
Oct 1, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-migrated-grain-deactivation

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Migrated activations can remain active indefinitely when they receive no requests on the destination silo because their idle stopwatch has never been started.

Start idle timing when activation succeeds so the collector can expire both migrated and proactively created activations. Add focused regression coverage for collection without subsequent requests.

Fixes: #11364

Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:17

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

The focused lifecycle fix addresses the reported leak and includes coverage for both affected activation paths.

Review effort: Balanced
Findings: None

What changed in this PR

Starts idle tracking after successful activation so migrated and proactively created grains can be collected without receiving requests.

Changes:

  • Initialize the idle stopwatch when activation becomes valid.
  • Add regression tests for idle collection with and without migration.
File Description
src/​Orleans.Runtime/​Catalog/​ActivationData.cs Starts idle timing upon successful activation.
test/​Orleans.Runtime.Internal.Tests/​ActivationsLifeCycleTests/​ActivationDataMigrationTests.cs Verifies request-free activations are collected correctly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ReubenBond
ReubenBond force-pushed the rb-migrated-grain-deactivation branch from 24cd964 to 5ae3bcf Compare October 1, 2026 15:21
Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:32
@ReubenBond
ReubenBond force-pushed the rb-migrated-grain-deactivation branch from 5ae3bcf to ef46d60 Compare October 1, 2026 15:32

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

The focused runtime fix addresses the reported lifecycle gap and is covered by both migration and proactive-activation tests.

Review effort: Balanced
Findings: None

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 82.85% (115,401 / 139,284)
Branches 72.16% (33,486 / 46,407)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 6bf11ad, not current main 5993708.

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 3d84841 into dotnet:main Oct 1, 2026
73 checks passed
@ReubenBond
ReubenBond deleted the rb-migrated-grain-deactivation branch October 1, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A migrated grain, that doesn't receive a message, never deactivates

2 participants