Skip to content

Commit 9ac50cd

Browse files
committed
Resolve merge conflicts with master
1 parent cd565c7 commit 9ac50cd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ private HttpTimeoutPolicyControlPlaneRetriableHotPath(bool shouldThrow503OnTimeo
2020
this.shouldThrow503OnTimeout = shouldThrow503OnTimeout;
2121
}
2222

23+
// The first-attempt timeout was raised from 500ms to 1s to align with HttpTimeoutPolicyForThinClient
24+
// (see issue #5642). The original 500ms value caused spurious TaskCanceledException retries on
25+
// .NET 10 due to changes in HttpConnectionPool behavior and any environment with moderate network
26+
// latency. The 5s and 65s tail attempts are preserved to keep the existing retry budget for slow
27+
// control-plane operations.
2328
private readonly IReadOnlyList<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> TimeoutsAndDelays = new List<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)>()
2429
{
25-
(TimeSpan.FromSeconds(.5), TimeSpan.Zero),
30+
(TimeSpan.FromSeconds(1), TimeSpan.Zero),
2631
(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(1)),
2732
(TimeSpan.FromSeconds(65), TimeSpan.Zero),
2833
};

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public async Task RetryTransientIssuesTestAsync()
7575
}},
7676
{HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance, new List<TimeSpan>()
7777
{
78-
TimeSpan.FromSeconds(1),
78+
TimeSpan.FromSeconds(2),
7979
TimeSpan.FromSeconds(6),
8080
TimeSpan.FromSeconds(66)
8181
}},

0 commit comments

Comments
 (0)