docs: add placement hint guidance - #10844
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
RequestContextplacement 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
Contributor
Code coverage78.61% line coverage - 99,136 / 126,115 lines Coverage details
|
This was referenced Aug 29, 2026
This was referenced Sep 9, 2026
Closed
Closed
This was referenced Sep 16, 2026
Open
Merged
Merged
This was referenced Sep 23, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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
IClusterMembershipServiceandILocalSiloDetails, select an active silo other than the caller, and use the hint when calling a grain that may need activation, invokingMigrateOnIdle, or passing a migration-specific dictionary directly toIGrainContext.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