File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ function executeWithServerSelection<TResult>(
249
249
250
250
if ( ( hasReadAspect && willRetryRead ) || ( hasWriteAspect && willRetryWrite ) ) {
251
251
if ( hasWriteAspect && willRetryWrite ) {
252
- operation . options . willRetryWrite = true ;
252
+ operation . options . willRetryWrites = true ;
253
253
session . incrementTransactionNumber ( ) ;
254
254
}
255
255
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export abstract class AbstractOperation<TResult = any> {
57
57
bsonOptions ?: BSONSerializeOptions ;
58
58
59
59
// TODO: Each operation defines its own options, there should be better typing here
60
- options : Document ;
60
+ options : OperationOptions ;
61
61
62
62
[ kSession ] : ClientSession | undefined ;
63
63
Original file line number Diff line number Diff line change @@ -964,10 +964,10 @@ export function applySession(
964
964
command . lsid = serverSession . id ;
965
965
966
966
// first apply non-transaction-specific sessions data
967
- const inTransaction = session . inTransaction ( ) || isTransactionCommand ( command ) ;
968
- const isRetryableWrite = options ?. willRetryWrite || false ;
967
+ const inTransaction = session . inTransaction ( ) ?? isTransactionCommand ( command ) ;
968
+ const isRetryableWrite = options . willRetryWrites ?? false ;
969
969
970
- if ( serverSession . txnNumber && ( isRetryableWrite || inTransaction ) ) {
970
+ if ( isRetryableWrite || inTransaction ) {
971
971
command . txnNumber = Long . fromNumber ( serverSession . txnNumber ) ;
972
972
}
973
973
You can’t perform that action at this time.
0 commit comments