Repository navigation
fix(testing): handle narrow reminder owner ranges - #11336
Merged
ReubenBond merged 1 commit intoSep 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
Contributor
Code coverage
Report-only conclusion: regressed. The current-main baseline is commit 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 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 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
GrainIdhashes 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