Skip to content

fix(networking): classify normal connection closure during sends - #11426

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-client-route-retirement-errors
Oct 7, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-client-route-retirement-errors

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

RollingUpgrade_LocalToDistributed_NoErrors completed its activation and directory checks, then failed on an Orleans.Connections error log for a client-route write interrupted by normal peer closure during silo retirement (failure).

MessageWriteRequest.SetException logged every failed transport write at error level before rerouting the messages. The transport contract identifies normal closure with ConnectionClosedException, and connection shutdown already handles that type at information level. Client-directory publication quiescence drains RPC work; the transport still owns accepted writes and reports their completion or closure separately.

Classify ConnectionClosedException at the write-completion boundary as informational while preserving the exception, messages, rerouting, and request reset. Other failures retain error-level reporting.

Add a deterministic accepted-write shutdown regression covering normal closure, aborted connections, cancellation, and unexpected failures. It checks that every pending request/response is rerouted with its original exception and body, successful-send accounting remains unchanged, and the write request is reset for reuse. The normal-closure case reproduced the previous error-level log before the fix.

The rolling-upgrade test and its directory/activation guarantees remain unchanged. This is an independent fix against main, separate from #11425.

Related to #10903 and #10904; complements #10917's publication-quiescence fix.

Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 7, 2026 15: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.

🟢 Approval recommended

The focused implementation matches the transport contract and is covered by deterministic lifecycle tests.

0 open findings

What changed in this PR

Classifies normal connection closure during pending sends as informational while preserving rerouting behavior.

Changes:

  • Logs ConnectionClosedException at information level.
  • Adds regression coverage for closure, cancellation, abort, and unexpected failures.
File Description
src/​Orleans.Core/​Networking/​MessageWriteRequest.cs Adjusts logging severity for normal closure.
test/​Orleans.Core.Tests/​Networking/​MessageTransportLifecycleTests.cs Verifies logging, rerouting, message integrity, accounting, and request reuse.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ReubenBond
ReubenBond merged commit c7056b3 into dotnet:main Oct 7, 2026
86 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-client-route-retirement-errors branch October 7, 2026 15:39
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.26% (117,884 / 141,586)
Branches 72.73% (34,927 / 48,026)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 8877dea, not current main c7056b3.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 18, 2026
…pgrade test

RollingUpgrade_LocalToDistributed_NoErrors can fail its final no-error-log assertion when MembershipAgent.ValidateInitialConnectivity logs a transient, recoverable startup ping-retry failure (LogLevel.Error, event MembershipJoiningPreconditionFailure) during a newly-joining silo's pre-active connectivity check.

This is pre-existing MembershipAgent behavior, unrelated to recent PRs dotnet#11431/dotnet#11447/dotnet#11426/dotnet#10187/dotnet#10772: each retriable attempt logs at error level even when a subsequent retry succeeds and the connectivity-validation loop breaks cleanly. Only exhausted retries (MaxJoinAttemptTime elapsed) throw and fail silo startup, which would already fail this test before reaching its final assertion.

Add a narrow filter, consistent with the existing IsExpectedClientRoutingTableCancellation/IsExpectedDirectoryPartitionRejection filters, that excludes only this specific recovered-retry log line and surfaces the count/content of any filtered retries in test output for visibility.

Fixes dotnet#11444
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 19, 2026
…pgrade test

RollingUpgrade_LocalToDistributed_NoErrors can fail its final no-error-log assertion when MembershipAgent.ValidateInitialConnectivity logs a transient, recoverable startup ping-retry failure (LogLevel.Error, event MembershipJoiningPreconditionFailure) during a newly-joining silo's pre-active connectivity check.

This is pre-existing MembershipAgent behavior, unrelated to recent PRs dotnet#11431/dotnet#11447/dotnet#11426/dotnet#10187/dotnet#10772: each retriable attempt logs at error level even when a subsequent retry succeeds and the connectivity-validation loop breaks cleanly. Only exhausted retries (MaxJoinAttemptTime elapsed) throw and fail silo startup, which would already fail this test before reaching its final assertion.

Add a narrow filter, consistent with the existing IsExpectedClientRoutingTableCancellation/IsExpectedDirectoryPartitionRejection filters, that excludes only this specific recovered-retry log line and surfaces the count/content of any filtered retries in test output for visibility.

Fixes dotnet#11444
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 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