fix: collect idle migrated grain activations - #11365
Conversation
There was a problem hiding this comment.
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.
24cd964 to
5ae3bcf
Compare
5ae3bcf to
ef46d60
Compare
Code coverage
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 |
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