fix(rebalancing): honor latest suspension duration - #10614
Merged
ReubenBond merged 2 commits intoAug 17, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Orleans’ activation rebalancer suspension logic so that an explicit suspension request overwrites any prior explicit suspension deadline (instead of retaining the later deadline), and adds a regression test to validate shortening/extending behavior.
Changes:
- Change
ActivationRebalancerWorker.SuspendForto set_suspendedUntilTsdirectly (honor latest explicit request). - Add a new regression test covering shortening and extending an explicit suspension duration.
Show a summary per file
| File | Description |
|---|---|
| test/Orleans.Placement.Tests/ActivationRebalancingTests/ControlRebalancerTests.cs | Adds a regression test for latest explicit suspension duration semantics. |
| src/Orleans.Runtime/Placement/Rebalancing/ActivationRebalancerWorker.cs | Updates suspension deadline assignment to reflect the latest explicit request. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
test/Orleans.Placement.Tests/ActivationRebalancingTests/ControlRebalancerTests.cs:127
- The test does not currently verify that the first (longer) suspension request actually took effect. If the initial call were ignored (or clamped), the rest of the test could still pass because it only asserts on the subsequent shorter/longer follow-up requests. Adding assertions on
afterLongerCallmakes the regression coverage stronger and ensures the scenario setup is valid.
await rebalancer.SuspendRebalancing(longerDuration);
var afterLongerCall = await rebalancer.GetRebalancingReport();
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
This was referenced Aug 28, 2026
Merged
Merged
This was referenced Sep 7, 2026
Closed
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explicit suspension requests previously retained the later of the existing and requested deadlines. A shorter follow-up request could therefore report a duration greater than the caller requested.
Set the suspension deadline from the latest explicit request and add regression coverage for shortening and extending a suspension.
Fixes #10478
Microsoft Reviewers: Open in CodeFlow