Skip to content

Stabilize directory ownership checks - #10048

Closed
ReubenBond wants to merge 3 commits into
dotnet:mainfrom
ReubenBond:fix/directory-stable-ownership-view
Closed

ReubenBond wants to merge 3 commits into
dotnet:mainfrom
ReubenBond:fix/directory-stable-ownership-view

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Apr 28, 2026 •

Copy link
Copy Markdown
Member

Stack 2/3, based on: #10047

This waits for a stable directory ownership view before serving register, lookup, and deregister operations, then stamps registrations with the captured membership version used for ownership validation.

Microsoft Reviewers: Open in CodeFlow

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 improves correctness of distributed grain directory operations during membership/ownership transitions by waiting for a stable directory-ownership view before serving register/lookup/deregister, and by stamping successful registrations with the membership version used for ownership validation.

Changes:

  • Replace per-request WaitForRange(...); IsOwner(CurrentView, ...) checks with a new helper that waits for a stable ownership view (WaitForOwnershipViewAsync).
  • Use the captured stable view for ownership assertions and refresh-required responses.
  • Stamp new/overridden registrations with the captured view’s membership version instead of the potentially-updated CurrentView.Version.
Show a summary per file
File Description
src/Orleans.Runtime/GrainDirectory/GrainDirectoryPartition.Interface.cs Ensures register/lookup/deregister wait for a stable ownership view and stamps registrations with the validated membership version.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 1dc35ac to 4f710e1 Compare April 28, 2026 22:54
@ReubenBond
ReubenBond force-pushed the fix/directory-snapshot-transfer-ranges branch from b9007e0 to 46e81cf Compare April 28, 2026 22:55
@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 4f710e1 to 2d210eb Compare April 28, 2026 23:13
@ReubenBond
ReubenBond force-pushed the fix/directory-snapshot-transfer-ranges branch from 46e81cf to f38fbdd Compare April 28, 2026 23:13
@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 2d210eb to 84d2be4 Compare April 29, 2026 14:51
@ReubenBond
ReubenBond force-pushed the fix/directory-snapshot-transfer-ranges branch from f38fbdd to 4ff2582 Compare April 29, 2026 14:51
@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 84d2be4 to 7f1c458 Compare April 29, 2026 15:09
@ReubenBond
ReubenBond force-pushed the fix/directory-snapshot-transfer-ranges branch from 4ff2582 to 4993770 Compare April 29, 2026 15:10
@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 7f1c458 to 223d182 Compare April 29, 2026 18:23
@ReubenBond
ReubenBond force-pushed the fix/directory-snapshot-transfer-ranges branch from 4993770 to 8f24b05 Compare April 29, 2026 18:26
@ReubenBond
ReubenBond changed the base branch from fix/directory-snapshot-transfer-ranges to main April 29, 2026 18:29
@ReubenBond ReubenBond closed this Apr 29, 2026
@ReubenBond ReubenBond reopened this Apr 29, 2026
@ReubenBond
ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 223d182 to b44650b Compare April 29, 2026 19:40
ReubenBond and others added 3 commits April 29, 2026 12:41
Query each previous owner only for the intersection of its prior range and the range being acquired during distributed directory migration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Split distributed-directory snapshot and recovery activation fetches by subrange so individual messages stay below MaxMessageBodySize during large range transfers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wait on a stable ownership view before serving register, lookup, and deregister requests, and stamp registrations with the captured membership version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond

Copy link
Copy Markdown
Member Author

Closing this as folded into #10047.

The stable ownership check commit from this PR is now part of the first merge candidate so that every PR can target main and still pass CI before merge. The new active order is:

  1. Cap distributed directory ownership transfer batch size #10047
  2. Batch large directory transfer payloads #10053
  3. Add distributed remote grain directory compatibility #10050
  4. Add directory migration join regression #10049

@ReubenBond ReubenBond closed this Apr 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 30, 2026
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.

2 participants