Skip to content

docs: add placement hint guidance - #10844

Merged
ReubenBond merged 6 commits into
dotnet:mainfrom
ReubenBond:rb-docs-add-placement-hints
Aug 27, 2026
Merged

ReubenBond merged 6 commits into
dotnet:mainfrom
ReubenBond:rb-docs-add-placement-hints

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Placement hints are supported by the built-in placement directors for new activation placement and activation migration, but the grain placement guide did not show application code for selecting and targeting a silo.

Add a direct-placement and migration section with compiled examples that inject IClusterMembershipService and ILocalSiloDetails, select an active silo other than the caller, and use the hint when calling a grain that may need activation, invoking MigrateOnIdle, or passing a migration-specific dictionary directly to IGrainContext.Migrate. The guidance explains request-context capture and propagation, activation timing, membership snapshots, compatibility filtering, existing activations, preserving the caller's request-context value, and containing the inherited hint before a receiving grain makes unrelated outgoing calls.

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings August 26, 2026 23:21

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

Adds documentation and a compiled snippet demonstrating how to use placement hints to directly place a newly activated grain on a specific silo (the caller’s silo), clarifying activation timing and compatibility behavior within Orleans’ placement pipeline.

Changes:

  • Added a new compiled snippet showing how to set/restore RequestContext placement hints around an activation-triggering grain call.
  • Updated the grain placement guide with a new “Direct placement with placement hints” section referencing the snippet and explaining key behavioral details.
Show a summary per file
File Description
docs/site/src/content/docs/grains/snippets/placement/PlacementHints.cs New snippet demonstrating placement hints via RequestContext during a worker-grain call.
docs/site/src/content/docs/grains/grain-placement.md Adds a new documentation section describing placement hints and referencing the new snippet.

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

Comment thread docs/site/src/content/docs/grains/snippets/placement/PlacementHints.cs Outdated
Comment thread docs/site/src/content/docs/grains/grain-placement.md Outdated
Copilot AI review requested due to automatic review settings August 26, 2026 23:35

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: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

78.61% line coverage - 99,136 / 126,115 lines

Coverage details

Copilot AI review requested due to automatic review settings August 27, 2026 03:42

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: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 27, 2026 18:10

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: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 27, 2026 18:38

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

Review tier: Lite
Findings: None

Copilot AI review requested due to automatic review settings August 27, 2026 19:23

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

Review tier: Lite
Findings: None

@ReubenBond
ReubenBond merged commit 8af2ec2 into dotnet:main Aug 27, 2026
138 of 141 checks passed
@ReubenBond
ReubenBond deleted the rb-docs-add-placement-hints branch August 27, 2026 21:22
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 27, 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