fix(reminders): always start the first retry attempt - #10819
Merged
ReubenBond merged 2 commits intoAug 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes reminder retry timing so the first operation is always invoked and counted.
Changes:
- Adjusts first-attempt timeout handling.
- Adds regression coverage for invocation count and diagnostics.
Review finding: Moderate (4 votes) — Recompute the remaining deadline after invoking the operation to prevent accepting successful results after the hard deadline.
Show a summary per file
| File | Summary |
|---|---|
test/Orleans.Reminders.TestKit.Tests/ReminderTableRetryPolicyTests.cs |
Adds regression coverage for the first attempt. |
src/Orleans.Reminders.TestKit/ReminderTableRetryPolicy.cs |
Updates retry timing and attempt accounting. |
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
Contributor
Code coverage77.63% line coverage - 97,599 / 125,728 lines Coverage details
|
ReubenBond
force-pushed
the
rb-flaky-reminder-retry-hard-bounds
branch
from
August 26, 2026 08:15
7553ebc to
3132dcc
Compare
This was referenced Aug 28, 2026
This was referenced Aug 29, 2026
This was referenced Aug 29, 2026
This was referenced Sep 9, 2026
Closed
Closed
This was referenced Sep 16, 2026
Open
Merged
Merged
This was referenced Sep 23, 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
The reminder TestKit retry policy starts its timeout stopwatch before entering the retry loop. Under scheduler pressure, a short deadline can expire before the first operation is invoked, producing a timeout diagnostic with
attempts=0even though the policy is intended to hard-bound the first attempt.Solution
Always start and count the first operation, then apply the remaining deadline to its completion. Subsequent attempts continue to start only while time remains. The regression test uses a one-tick timeout and verifies that the blocked operation is invoked exactly once and reported as
attempts=1.Rationale
Attempt diagnostics now consistently describe operations which were started. The retry deadline remains hard-bounded, while scheduler delays before the first invocation can no longer skip the first attempt or make its diagnostic nondeterministic.
Fixes #10812
Microsoft Reviewers: Open in CodeFlow