Skip to content

fix(test): follow latest reminder reconciliation - #10815

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-cosmos-reminder-reconciliation
Aug 25, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-cosmos-reminder-reconciliation

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Problem

#10794 made the reminder join barrier await every historical range-change read. A newer refresh already supersedes older results through localTableSequence, but a stalled obsolete provider or cluster request remained in the barrier's task chain and could consume the full churn deadline.

In the one-join in-memory scenario, a reconciliation timeout also occurred before the started silo handle was assigned. The additional silo remained active and contaminated the shared fixture, producing cascading setup and readiness failures.

Solution

Track the current range-change reconciliation and signal generation changes. The barrier now follows a newer generation immediately, waits for the latest reconciliation to finish, and still propagates failures from the current generation.

Update the controlled interleaving test to keep an older range read blocked while a newer reconciliation completes, proving that obsolete work no longer prevents readiness.

Retain each join startup task and clean up every silo added after the initial topology, even when startup or reconciliation fails before the helper returns. The one- and two-join scenarios share the same cleanup path.

Rationale

This aligns the test barrier with the reminder service's existing supersession invariant while preserving exact ownership and schedule synchronization. Topology restoration is now independent of where the join readiness sequence fails.

Fixes #10804
Fixes #10805
Fixes #10810

Copilot AI lite review requested due to automatic review settings August 25, 2026 08:27

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 updates the test-only reminder range-change reconciliation barrier in LocalReminderService so it tracks and waits for the latest reconciliation generation, instead of being forced to await every prior in-flight range read (even when those results are already superseded). This targets flaky reminder-join tests where an obsolete/stalled provider read could consume the entire churn deadline.

Changes:

  • Switch the reconciliation barrier to follow rangeChangeGeneration updates via a generation-change signal, so obsolete in-flight reads don’t block readiness.
  • Simplify generation tracking by recording only the current generation’s reconciliation task (rather than chaining all historical tasks).
  • Update the controlled interleaving test to block an older range read while allowing a newer reconciliation + barrier completion to proceed.
Show a summary per file
File Description
test/Orleans.Reminders.Tests/TimerTests/LocalReminderServiceTests.cs Updates the interleaving test to assert the barrier completes with the latest reconciliation while an older blocked read remains in-flight.
src/Orleans.Reminders/ReminderService/LocalReminderService.cs Introduces a generation-change signal and revises the test-only barrier logic to follow the latest generation and still surface failures for the current reconciliation.

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

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

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

77.46% line coverage - 97,312 / 125,634 lines

Coverage details

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

Labels

None yet

Projects

None yet

2 participants