@@ -118,18 +118,18 @@ This method should perform the following sequence of actions:
118118
119119 1 . Record the current monotonic time, which will be used to enforce the 120-second / CSOT timeout before later retry
120120 attempts.
121- 2 . Set ` transactionAttempt ` to ` 0 ` . This will be used for backoff later in steps 6.2 and 9.2.
121+ 2 . Set ` transactionAttempt ` to ` 0 ` .
122122 3 . Set ` TIMEOUT_MS ` to be ` timeoutMS ` if given, otherwise 120-seconds.
123123
1241242 . If ` transactionAttempt ` > 0:
125125
126- 1 . If elapsed time + ` backoffMS ` > ` TIMEOUT_MS ` , then raise the callback's error. If the elapsed time of
126+ 1 . If elapsed time + ` backoffMS ` > ` TIMEOUT_MS ` , then raise the previously encountered error. If the elapsed time of
127127 ` withTransaction ` is less than TIMEOUT_MS, calculate the backoffMS to be
128- ` jitter * min(BACKOFF_INITIAL * ( 1.5** transactionAttempt - 1), BACKOFF_MAX) ` . sleep for ` backoffMS ` .
128+ ` jitter * min(BACKOFF_INITIAL * 1.5 ** ( transactionAttempt - 1), BACKOFF_MAX) ` . sleep for ` backoffMS ` .
129129
130130 1 . jitter is a random float between \[ 0, 1)
131131
132- 2 . transactionAttempt is the variable defined in step 1.
132+ 2 . ` transactionAttempt ` is the variable defined in step 1.
133133
134134 3 . ` BACKOFF_INITIAL ` is 5ms
135135
@@ -172,7 +172,7 @@ This method should perform the following sequence of actions:
17217210 . If ` commitTransaction ` reported an error:
173173
174174 1 . If the ` commitTransaction ` error includes a "UnknownTransactionCommitResult" label and the error is not
175- MaxTimeMSExpired and the elapsed time of ` withTransaction ` is less than TIMEOUT_MS, jump back to step eight . We
175+ MaxTimeMSExpired and the elapsed time of ` withTransaction ` is less than TIMEOUT_MS, jump back to step nine . We
176176 will trust ` commitTransaction ` to apply a majority write concern on retry attempts (see:
177177 [ Majority write concern is used when retrying commitTransaction] ( #majority-write-concern-is-used-when-retrying-committransaction ) ).
178178
0 commit comments