Repository navigation
test(transactions): preserve graceful recovery drain budget - #10537
Merged
ReubenBond merged 1 commit intoAug 12, 2026
Merged
Conversation
Keep the absolute failure watchdog unchanged while reallocating the skipped graceful observation window to draining the active producer batch. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts transaction recovery test watchdog budgeting so that a graceful silo shutdown reallocates the skipped failure-observation window into producer drain time, preserving the original absolute watchdog (client response timeout + scheduling margin) while avoiding false timeouts for non-cancellable in-flight calls.
Changes:
- Introduces explicit timeout budgeting (
ObservationWindow,ProducerDrainTimeout,MaximumDuration) viaTransactionRecoveryFailureObservation.GetTimeouts(...). - Updates the recovery runner to use the explicit budgets, including improved diagnostic logging and updated timeout messages.
- Adds deterministic unit test coverage validating budget allocation for graceful vs ungraceful shutdown modes.
Show a summary per file
| File | Description |
|---|---|
| test/Transactions/Orleans.Transactions.Tests/TransactionRecoveryFailureObservationTests.cs | Adds unit test coverage for the new timeout allocation model and updates named arguments to match the new API. |
| src/Orleans.Transactions.TestKit.Base/TestRunners/TransactionRecoveryTestsRunner.cs | Switches runner logic and diagnostics to use the explicit timeout allocations while preserving the overall watchdog. |
| src/Orleans.Transactions.TestKit.Base/TestRunners/TransactionRecoveryFailureObservation.cs | Adds Timeouts record + GetTimeouts helper and updates DetectAsync to accept explicit observation/drain allocations. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
This was referenced Aug 12, 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.
Problem
#10514 correctly stops transaction production immediately after a graceful silo shutdown, but its absolute producer-drain watchdog consequently retained only the 15-second scheduling margin. The active batch contains non-cancellable grain calls whose configured response lifetime is 30 seconds, so a valid in-flight batch can outlive that reduced drain budget.
Solution
Model failure observation and producer drain as explicit allocations within the existing 45-second absolute watchdog. Ungraceful shutdown keeps its 30-second observation window plus 15-second drain margin; graceful shutdown reallocates the skipped observation window to drain, giving active calls the full 45 seconds without increasing the overall watchdog.
Add deterministic coverage for both shutdown-mode allocations and report the individual phase budgets in diagnostics.
Fixes #10529
Microsoft Reviewers: Open in CodeFlow