@@ -26,7 +26,7 @@ internal static class TransactionExecutor
26
26
// constants
27
27
private const string TransientTransactionErrorLabel = "TransientTransactionError" ;
28
28
private const string UnknownTransactionCommitResultLabel = "UnknownTransactionCommitResult" ;
29
- private const int ExceededTimeLimitErrorCode = 50 ;
29
+ private const int MaxTimeMSExpiredErrorCode = 50 ;
30
30
private static readonly TimeSpan __transactionTimeout = TimeSpan . FromSeconds ( 120 ) ;
31
31
32
32
public static TResult ExecuteWithRetries < TResult > (
@@ -207,10 +207,10 @@ private static bool HasErrorLabel(Exception ex, string errorLabel)
207
207
}
208
208
}
209
209
210
- private static bool IsExceededTimeLimitException ( Exception ex )
210
+ private static bool IsMaxTimeMSExpiredException ( Exception ex )
211
211
{
212
212
if ( ex is MongoExecutionTimeoutException timeoutException &&
213
- timeoutException . Code == ExceededTimeLimitErrorCode )
213
+ timeoutException . Code == MaxTimeMSExpiredErrorCode )
214
214
{
215
215
return true ;
216
216
}
@@ -221,7 +221,7 @@ private static bool IsExceededTimeLimitException(Exception ex)
221
221
if ( writeConcernError != null )
222
222
{
223
223
var code = writeConcernError . GetValue ( "code" , - 1 ) . ToInt32 ( ) ;
224
- if ( code == ExceededTimeLimitErrorCode )
224
+ if ( code == MaxTimeMSExpiredErrorCode )
225
225
{
226
226
return true ;
227
227
}
@@ -250,7 +250,7 @@ private static bool ShouldRetryCommit(Exception ex, DateTime startTime, DateTime
250
250
return
251
251
HasErrorLabel ( ex , UnknownTransactionCommitResultLabel ) &&
252
252
! HasTimedOut ( startTime , now ) &&
253
- ! IsExceededTimeLimitException ( ex ) ;
253
+ ! IsMaxTimeMSExpiredException ( ex ) ;
254
254
}
255
255
256
256
// nested types
0 commit comments