Skip to content

Commit d0b59ff

Browse files
committed
Update maxretry naming
1 parent 9acfb24 commit d0b59ff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Microsoft.Azure.Cosmos/src/ClientRetryPolicy.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ internal sealed class ClientRetryPolicy : IDocumentClientRetryPolicy
2323
private const int RetryIntervalInMS = 1000; // Once we detect failover wait for 1 second before retrying request.
2424
private const int MaxRetryCount = 120;
2525
private const int MaxServiceUnavailableRetryCount = 1;
26+
private const int MaxSessionTokenRetryCount = 2;
2627

2728
private readonly IDocumentClientRetryPolicy throttlingRetry;
2829
private readonly GlobalEndpointManager globalEndpointManager;
@@ -456,7 +457,7 @@ private ShouldRetryResult ShouldRetryOnSessionNotAvailable(DocumentServiceReques
456457
}
457458
else
458459
{
459-
if (this.sessionTokenRetryCount > 2)
460+
if (this.sessionTokenRetryCount > MaxSessionTokenRetryCount)
460461
{
461462
// When cannot use multiple write locations, then don't retry the request if
462463
// we have already tried this request on the write location.

0 commit comments

Comments
 (0)