File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -192,17 +192,17 @@ async function executeOperationAsync<
192
192
193
193
const hasReadAspect = operation . hasAspect ( Aspect . READ_OPERATION ) ;
194
194
const hasWriteAspect = operation . hasAspect ( Aspect . WRITE_OPERATION ) ;
195
- const retryable = ( hasReadAspect && willRetryRead ) || ( hasWriteAspect && willRetryWrite ) ;
195
+ const willRetry = ( hasReadAspect && willRetryRead ) || ( hasWriteAspect && willRetryWrite ) ;
196
196
197
- if ( retryable ) {
197
+ if ( hasWriteAspect && willRetryWrite ) {
198
198
operation . options . willRetryWrite = true ;
199
199
session . incrementTransactionNumber ( ) ;
200
200
}
201
201
202
202
try {
203
203
return await operation . executeAsync ( server , session ) ;
204
204
} catch ( operationError ) {
205
- if ( retryable && operationError instanceof MongoError ) {
205
+ if ( willRetry && operationError instanceof MongoError ) {
206
206
return await retryOperation ( operation , operationError , {
207
207
session,
208
208
topology,
You can’t perform that action at this time.
0 commit comments