Skip to content

fix(testing): handle narrow reminder owner ranges - #11336

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-11325-reminder-join-leave-flake
Sep 19, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-11325-reminder-join-leave-flake

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Problem

The reminder lifecycle join/leave scenario selected a grain owned by the newly joined silo by probing at most 65,535 deterministic GUIDs. With the non-virtual consistent ring, a valid silo range can be narrower than that sample reliably covers. In #11325, the joined silo owned (0x4341E660, 0x434393A0], and the first matching deterministic candidate was 85,916, so identity selection failed before reminder registration.

Merged #11312 only changes Cosmos membership consistency and shared membership-test cleanup; it does not affect this reminder test or its ring selection.

Solution and rationale

Snapshot the joined silo's reconciled ring range and search the existing deterministic GUID sequence without the 16-bit ceiling, bounded by cancellation and a focused identity-selection timeout. Compute candidate GrainId hashes directly against the snapshot to avoid repeated live topology/DI lookups, then verify ownership once more before using the selected grain.

Add a regression using the exact range from #11325, proving that selection reaches the first matching candidate at index 85,916 while preserving natural GUID-key hashing and provider serialization behavior.

Fixes #11325

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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes reminder lifecycle tests so grains can be selected reliably within narrow consistent-ring ranges.

Changes:

  • Searches beyond 65,535 deterministic candidates using stable ring snapshots.
  • Adds cancellation/timeout handling and ownership verification.
  • Adds regression coverage for the 85,916-candidate case.
File Description
test/​Orleans.Testing.Reminders/​ReminderServiceLifecycleHarness.cs Exposes silo ring-range snapshots.
test/​Orleans.Reminders.TestKit.Tests/​ReminderServiceLifecycleConformanceTests.cs Adds narrow-range regression coverage.
src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs Implements bounded, snapshot-based identity selection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request Current main Variance
Lines 82.78% (114,905 / 138,812) 82.84% (114,944 / 138,756) -0.0615 pp
Branches 72.03% (33,311 / 46,244) 72.12% (33,348 / 46,238) -0.0894 pp

Report-only conclusion: regressed.

The current-main baseline is commit 598c0d2813 and uses the same reviewed coverage matrix.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

@ReubenBond
ReubenBond merged commit b699424 into dotnet:main Sep 19, 2026
73 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-11325-reminder-join-leave-flake branch September 19, 2026 15:27
@ReubenBond ReubenBond changed the title fix(testing): handle narrow reminder owner ranges fix(testing): guarantee reminder owner placement Sep 19, 2026
@ReubenBond ReubenBond changed the title fix(testing): guarantee reminder owner placement fix(testing): handle narrow reminder owner ranges Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(reminders): investigate join/leave identity selection failure

2 participants