File tree Expand file tree Collapse file tree
Microsoft.Azure.Cosmos/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments