Skip to content

fix(test): await reminder range reconciliation - #10794

Merged
ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:rb-fix-reminder-test-race
Aug 23, 2026
Merged

ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:rb-fix-reminder-test-race

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Problem

The deterministic reminder join helper waits for membership, gateway, grain-directory, and reminder-service startup convergence, but that does not await the LocalReminderService range-change reconciliation queued by the topology change. The next forced refresh can therefore overlap the still-running range read on the same service scheduler and consume the shared churn deadline.

This gap remained after #10612 added explicit refresh barriers, #10665 serialized them, #10666 re-enabled the test, and #10709 restored fixture topology.

Solution

Track every in-flight reminder range-change reconciliation and expose a test-only barrier which waits for all observed generations to complete. The join helper now awaits that barrier on every active silo while reminder time remains paused, before schedule synchronization or clock advancement resumes.

Add a controlled interleaving test which blocks two overlapping range reads, completes the newer one first, and verifies that the barrier continues waiting for the older reconciliation.

Rationale

This establishes the missing topology boundary without increasing timeouts or weakening exact owner and tick assertions. Reconciliation failures continue to propagate instead of being hidden by a later forced refresh.

Fixes #10781

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings August 23, 2026 08:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a determinism gap in Orleans reminder tests by ensuring that silo-join/topology changes also await the LocalReminderService’s queued range-change reconciliation, preventing a subsequent forced refresh from overlapping an in-flight range read and consuming shared churn deadlines.

Changes:

  • Track in-flight reminder range-change reconciliation work in LocalReminderService and expose a test-only barrier to await completion across observed generations.
  • Update the deterministic reminder join helper to await the new reconciliation barrier on all active silos after membership/service convergence.
  • Add a controlled interleaving test which blocks two overlapping range reads, completes the newer first, and asserts the barrier still waits for the older reconciliation.
Show a summary per file
File Description
test/Orleans.Reminders.Tests/TimerTests/ReminderTestsBase.cs Adds a post-start barrier wait to ensure range-change reconciliation completes before tests resume fake-time/schedule synchronization.
test/Orleans.Reminders.Tests/TimerTests/LocalReminderServiceTests.cs Adds an interleaving regression test and a gated reminder table to validate the reconciliation barrier’s behavior under overlap.
src/Orleans.Reminders/ReminderService/LocalReminderService.cs Tracks range-change reconciliation tasks/generations and provides test-only APIs to await reconciliation and drive range changes.

Review details

💡 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: 2
  • Review effort level: Lite

@github-actions

github-actions Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

53.35% line coverage - 53,326 / 99,964 lines

Coverage details

Copilot AI review requested due to automatic review settings August 23, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 23, 2026 09:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Rem_Grain_1J_MultiGrainMultiReminders timeout after #10666

2 participants