Skip to content

[10.x] fix(runtime): align consistent ring routing with unsigned ranges - #11598

Merged
ReubenBond merged 1 commit into
dotnet:10.xfrom
ReubenBond:rb-ring-hashing-10x-backport
Oct 27, 2026
Merged

ReubenBond merged 1 commit into
dotnet:10.xfrom
ReubenBond:rb-ring-hashing-10x-backport

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Backports #11599 (commit 2438ff0) to 10.x for #11584.

ConsistentRingProvider now uses unsigned silo hash positions consistently for member ordering, local range boundaries, and primary-owner lookup. Requests therefore route to the owner of the published (predecessor, silo] range, including negative silo hashes, endpoints, and wraparound. The same regression coverage exercises signed hash partitions, randomized rings, membership changes, and stopping silos.

This affects clusters explicitly configured with UseVirtualBucketsConsistentRing = false. The default virtual-buckets provider retains its existing behavior. Signed and unsigned member sorting differ only by a rotation, preserving published cyclic ranges for identical membership and insertion order; range-based stream queue balancing retains its existing behavior.

During a rolling upgrade, old callers can still route requests to the wrong reminder service. Reminder table writes persist, and the true owners reconcile on their next successful refresh (the default refresh period is five minutes); current 10.x already gates local reminder scheduling by range. A misrouted newly registered reminder can miss early occurrences before its owner loads the persisted row. Scheduling then resumes at the next future StartAt + N * Period occurrence, so recovery depends on a successful refresh and past occurrences can be missed. Custom grain services which depend on the defective request routing need application-specific upgrade handling.

@ReubenBond ReubenBond changed the title fix(runtime): align consistent ring routing with unsigned ranges (10.x) [10.x] fix(runtime): align consistent ring routing with unsigned ranges Oct 27, 2026
Use unsigned silo hash positions for member ordering, local boundaries, and primary-owner lookup. Signed and unsigned ordering differ only by a rotation, preserving published cyclic ranges during rolling upgrades.  (cherry picked from commit 2438ff0)
@ReubenBond
ReubenBond force-pushed the rb-ring-hashing-10x-backport branch from 030e896 to 74474ae Compare October 27, 2026 21:17
@ReubenBond
ReubenBond merged commit 776ce25 into dotnet:10.x Oct 27, 2026
86 checks passed
@ReubenBond
ReubenBond deleted the rb-ring-hashing-10x-backport branch October 27, 2026 21:56
This was referenced Oct 29, 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.

1 participant