fix(testing): track reminder schedules per owner - #10312
Merged
ReubenBond merged 1 commit intoJul 31, 2026
Merged
Conversation
Track reminder scheduling readiness per local reminder instance so ownership handoffs cannot consume another owner's armed-wait signal. Add regression coverage for overlapping old and current owners. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4c73dfde-a01e-455d-8c3a-59b8e2803e1a
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a synchronization race in the reminder diagnostics test harness where reminder ownership changes during paused fake time could cause clock advancement to stall until the overall test timeout. It does so by tracking schedule/arming state per local reminder owner instance (instead of aggregating per grain+reminder), ensuring that ticks from a previous owner cannot “consume” the current owner’s armed-wait signal.
Changes:
- Track tick attempts, tick-wait arming counts, and schedule/arming versions per local reminder owner instance.
- Require all active local owners to be armed before
WaitForLocalReminderScheduleAsynccompletes, and re-check/release waiters on ownership removal. - Add a regression test which models overlap between previous and current owners during a handoff.
Show a summary per file
| File | Description |
|---|---|
| test/Orleans.Reminders.Tests/Diagnostics/ReminderEventsTests.cs | Adds regression coverage for ownership handoff overlap ensuring schedule waits don’t stall. |
| src/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs | Refactors scheduling readiness tracking to be per-owner-instance, fixing the waiter/tick-consumption race. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
This was referenced Aug 28, 2026
Merged
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.
The Azure reminder churn test could stall until its five-minute cancellation when reminder ownership changed while fake time was paused. The reminder test observer aggregated scheduling state by grain and reminder, so an old owner's tick could consume the new owner's armed-wait signal and prevent further clock advancement.
Track tick attempts, armed waits, and schedule versions per local reminder owner instead. Clock advancement now waits until every active owner is armed, and ownership removal releases any newly satisfied waiter. Regression coverage models overlapping old and current owners during a handoff.
This fixes the test harness synchronization race without increasing timeouts or changing Azure Table reminder behavior.
Microsoft Reviewers: Open in CodeFlow