Repository navigation
fix(networking): classify normal connection closure during sends - #11426
Conversation
There was a problem hiding this comment.
🟢 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
ConnectionClosedExceptionat 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.
Code coverage
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 |
…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
…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
RollingUpgrade_LocalToDistributed_NoErrorscompleted its activation and directory checks, then failed on anOrleans.Connectionserror log for a client-route write interrupted by normal peer closure during silo retirement (failure).MessageWriteRequest.SetExceptionlogged every failed transport write at error level before rerouting the messages. The transport contract identifies normal closure withConnectionClosedException, 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
ConnectionClosedExceptionat 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