Repository navigation
[10.x] fix(client): honor startup cancellation and release startup resources - #11605
Merged
ReubenBond merged 7 commits intoOct 28, 2026
Merged
Conversation
ReubenBond
force-pushed
the
rb-client-cancellation-backport
branch
from
October 27, 2026 21:29
0f270f6 to
39ae2ac
Compare
…ations Backport of 08408c0. Regenerated the four affected public API surfaces on 10.x; the additive results match the main implementation.
…ility Backport of 496bbbe. Preserve 10.x point-read coverage when merging provider fixtures. Adapt callback instrumentation to 10.x constructors and its non-disposable Message, and grant Core.Tests access to the internal in-process provider using the TestingHost friend-assembly pattern.
…lization retries Backport of 15bf070. Each serialized manifest start attempt owns fresh readiness completion, finalization waits remain cancellable, and pending retry-filter faults are observed. Includes the required ADO.NET test token and focused retry regressions.
This was referenced Oct 29, 2026
This was referenced Nov 5, 2026
Bump Microsoft.Orleans.Clustering.AdoNet and Microsoft.Orleans.Runtime
ScarletKuro/Scarlet.Orleans#9
Open
This was referenced Nov 9, 2026
This was referenced Nov 16, 2026
This was referenced Nov 25, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backports #11604 to
10.xfor 10.4.1. Fixes #11585.Client startup observes cancellation through gateway-provider initialization and discovery, connection attempts, retry-filter decisions, and initial cluster-manifest retrieval. Runtime startup releases partially started resources before a cancelled start completes, because the client lifecycle begins after runtime startup succeeds. Gateway refreshes use the client's lifetime token.
Adds
IGatewayListProvider.InitializeGatewayListProviderAsync(CancellationToken)andGetGatewaysAsync(CancellationToken)with default implementations for existing providers. Built-in providers forward cancellation through their storage operations and preserve resource ownership, including late-created Cassandra sessions and shared Cosmos clients. Existing tokenless signatures remain available, including the public DynamoDB scan overload; the four affected public API surfaces are regenerated with additive changes.The manifest provider cancels and joins its owned background run when initialization is cancelled. Its local RPC waits observe cancellation independently of acknowledgement policy, while the runtime retains ownership of callbacks. Successful initialization detaches startup cancellation so subsequent refreshes follow the client lifetime; incomplete initialization propagates its actual failure or lifetime cancellation. Each serialized start attempt has fresh readiness completion, with cancellation remaining effective during run finalization. Retry-filter tasks have their eventual failures observed after cancellation ends the startup wait.
10.x adaptations use the keyed
Microsoft.AspNetCore.Connections.IConnectionFactoryregression seam, retain 10.x membership point-read coverage when combining provider fixtures, adapt callback instrumentation to 10.x constructors and its non-disposableMessage, and grantOrleans.Core.Testsfriend access to the internal in-process testing provider. The production cancellation semantics match main.Deterministic regressions cover owned-run completion, acknowledgement boundaries, native provider cancellation, legacy compatibility, shared/owned resource cleanup, initialization retries, and continued refresh after successful startup. Normal Release package validation remains enabled with no added compatibility suppressions.
Release note: Orleans clients cancel provider initialization, gateway discovery, and initial manifest retrieval promptly while releasing owned startup resources and preserving gateway-provider compatibility.