Skip to content

docs: modernize state and durability guidance - #10333

Merged
ReubenBond merged 8 commits into
dotnet:mainfrom
ReubenBond:reubenbond-docs-modernize-state-durability
Aug 7, 2026
Merged

ReubenBond merged 8 commits into
dotnet:mainfrom
ReubenBond:reubenbond-docs-modernize-state-durability

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

Modernizes Orleans 10 persistence, Event Sourcing, transaction, and grain interface versioning guidance. The update aligns durability guarantees, provider capabilities, failure behavior, and rolling-upgrade policies with the current implementation, while clearly distinguishing supported Event Sourcing from experimental Journaling.

Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings August 2, 2026 21:18

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 modernizes Orleans 10 documentation around durability-related features—transactions, grain persistence, event sourcing, and grain interface versioning—so that guarantees, defaults, and operational guidance better match current runtime behavior and provider capabilities.

Changes:

  • Updates the transactions article with clearer distinctions between transactional state vs IPersistentState, contention/timeout defaults, and retry/abort guidance.
  • Reworks grain interface versioning docs to emphasize numeric routing/placement, compatibility vs selector strategies, and rolling upgrade/rollback considerations.
  • Refreshes persistence + event sourcing docs to clarify provider semantics (ETags/concurrency, serializer/schema evolution) and to distinguish supported Event Sourcing from experimental Journaling.
Show a summary per file
File Description
docs/site/src/content/docs/grains/transactions.md Updates transaction enablement, transactional storage, semantics, and operational guidance.
docs/site/src/content/docs/grains/grain-versioning/version-selector-strategy.md Clarifies selector strategies and eligibility behavior for placement.
docs/site/src/content/docs/grains/grain-versioning/grain-versioning.md Reframes grain interface versioning as numeric routing/placement and documents defaults.
docs/site/src/content/docs/grains/grain-versioning/deploying-new-versions-of-grains.md Modernizes the rolling-upgrade narrative and adds rollback/observability guidance.
docs/site/src/content/docs/grains/grain-versioning/compatible-grains.md Updates compatibility strategy explanations and removes misleading “structural check” implications.
docs/site/src/content/docs/grains/grain-versioning/backward-compatibility-guidelines.md Condenses guidance into contract/payload/behavior rules for mixed-version deployments.
docs/site/src/content/docs/grains/grain-persistence/snippets/persistence/Interfaces.cs Updates the persistence interface snippet to reflect nullable ETag + cancellation overloads.
docs/site/src/content/docs/grains/grain-persistence/relational-storage.md Rewrites ADO.NET persistence guidance (providers, invariants/scripts, serializer + concurrency).
docs/site/src/content/docs/grains/grain-persistence/index.md Reworks persistence overview with provider selection, atomicity limits, and failure semantics.
docs/site/src/content/docs/grains/grain-persistence/dynamodb-storage.md Updates DynamoDB provider guidance and operational/serialization notes.
docs/site/src/content/docs/grains/grain-persistence/azure-storage.md Updates Azure Table/Blob provider guidance, limits, and operational notes.
docs/site/src/content/docs/grains/grain-persistence/azure-cosmos-db.md Updates Cosmos DB for NoSQL storage guidance and partitioning/indexing notes.
docs/site/src/content/docs/grains/event-sourcing/replicated-instances.md Clarifies multi-instance behavior, conflicts, and deployment topology responsibilities.
docs/site/src/content/docs/grains/event-sourcing/notifications.md Updates confirmed/tentative notification guidance and side-effect cautions.
docs/site/src/content/docs/grains/event-sourcing/log-consistency-providers.md Summarizes built-in providers with clearer tradeoffs and durability models.
docs/site/src/content/docs/grains/event-sourcing/journaledgrain-diagnostics.md Updates diagnostics guidance and reframes statistics usage/limitations.
docs/site/src/content/docs/grains/event-sourcing/journaledgrain-basics.md Modernizes the JournaledGrain API overview and confirmation/transition guidance.
docs/site/src/content/docs/grains/event-sourcing/index.md Refreshes the overview and explicitly distinguishes Event Sourcing vs experimental Journaling.
docs/site/src/content/docs/grains/event-sourcing/immediate-vs-delayed-confirmation.md Clarifies confirmation semantics, tentative state expectations, and scheduling guarantees.
docs/site/src/content/docs/grains/event-sourcing/event-sourcing-configuration.md Updates configuration guidance for provider registration/selection and multi-cluster responsibility.

Copilot's findings

  • Files reviewed: 20/20 changed files
  • Comments generated: 3

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's findings

Suppressed comments (2)

docs/site/src/content/docs/grains/grain-persistence/azure-storage.md:55

  • The connection-string example uses configuration.GetConnectionString(...), but configuration is not defined in this snippet, so readers copying this block will get a compile error. Consider using builder.Configuration (consistent with other pages) or explicitly declaring the IConfiguration variable in the snippet.
siloBuilder.AddAzureTableGrainStorage(
    "profileStore",
    options => options.ConfigureTableServiceClient(
        configuration.GetConnectionString("grainState")));
**docs/site/src/content/docs/grains/grain-persistence/relational-storage.md:69**
* This snippet assigns `options.ConnectionString = connectionString;` but `connectionString` isn't defined here, so the snippet is not copy/pasteable. Use a placeholder string or show how to obtain the connection string from configuration in the surrounding snippet.
    optionsBuilder.Configure<IGrainStorageSerializer>((options, serializer) =>
    {
        options.Invariant = "Npgsql";
        options.ConnectionString = connectionString;
        options.GrainStorageSerializer = serializer;
</details>


- **Files reviewed:** 20/20 changed files
- **Comments generated:** 0 new

Copilot AI review requested due to automatic review settings August 5, 2026 13:17

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's findings

Suppressed comments (4)

docs/site/src/content/docs/grains/grain-versioning/snippets/versioning/versioning.csproj:9

  • This snippet project pins Microsoft.Orleans.Server/Microsoft.Extensions.Hosting to 10.0.0, but docs/site/src/content/docs/Directory.Build.props centrally updates those packages (currently to newer patch versions). Leaving explicit versions here can cause confusing drift between what the project declares and what it actually restores. Consider omitting the Version attributes for centrally-managed packages.
    <PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />

docs/site/src/content/docs/grains/grain-persistence/snippets/persistence/persistence.csproj:13

  • This snippet project pins Microsoft.Orleans.Server/Microsoft.Extensions.Hosting to 10.0.0, but docs/site/src/content/docs/Directory.Build.props centrally updates those packages (currently to newer patch versions). Keeping explicit versions here makes it harder to keep snippet projects consistent. Consider removing the Version attributes for packages which are already updated centrally.
    <PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
    <PackageReference Include="Microsoft.Orleans.Persistence.AzureStorage" Version="10.0.0" />
    <PackageReference Include="Microsoft.Orleans.Persistence.Redis" Version="10.0.0" />
    <PackageReference Include="Microsoft.Orleans.Persistence.Cosmos" Version="10.0.0" />
    <PackageReference Include="Microsoft.Orleans.Persistence.AdoNet" Version="10.0.0" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />

docs/site/src/content/docs/grains/transactions.md:31

  • The external-client snippet references builder but doesn't declare it, so it isn't copy/pasteable as shown. Consider making the snippet self-contained by creating a HostApplicationBuilder in the client context before calling UseOrleansClient.
builder.UseOrleansClient(clientBuilder =>
{
    clientBuilder.UseTransactions();
});

docs/site/src/content/docs/grains/grain-versioning/deploying-new-versions-of-grains.md:33

  • This code block uses siloBuilder without showing where it comes from, so the example won't compile or copy/paste cleanly. Consider making the snippet self-contained by including the Host.CreateApplicationBuilder and builder.UseOrleans(siloBuilder => ...) context.
siloBuilder.Configure<GrainVersioningOptions>(options =>
{
    options.DefaultCompatibilityStrategy = nameof(BackwardCompatible);
    options.DefaultVersionSelectorStrategy = nameof(AllCompatibleVersions);
});
  • Files reviewed: 25/25 changed files
  • Comments generated: 0 new

ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Aug 5, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 9be838b5-7660-444e-b2c5-bf2e9b373472
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Aug 7, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 9be838b5-7660-444e-b2c5-bf2e9b373472
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Aug 7, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 9be838b5-7660-444e-b2c5-bf2e9b373472
@ReubenBond
ReubenBond force-pushed the reubenbond-docs-modernize-state-durability branch 2 times, most recently from 38f2185 to dade917 Compare August 7, 2026 17:49
@ReubenBond
ReubenBond enabled auto-merge August 7, 2026 18:00
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2ce67ac3-ba6e-4ec1-a824-d079657b494b
@ReubenBond
ReubenBond force-pushed the reubenbond-docs-modernize-state-durability branch from dade917 to ead723e Compare August 7, 2026 19:50
@ReubenBond
ReubenBond disabled auto-merge August 7, 2026 20:37
@ReubenBond
ReubenBond merged commit e5ed431 into dotnet:main Aug 7, 2026
66 of 67 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-docs-modernize-state-durability branch August 7, 2026 20:38
This was referenced Aug 28, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 7, 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