Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(retryable-writes): don't increment txnNumber on retries
Browse files Browse the repository at this point in the history
NODE-1105
  • Loading branch information
mbroadst committed Dec 1, 2017
1 parent e6defa7 commit e7c2242
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions lib/topologies/mongos.js
Expand Up @@ -912,9 +912,6 @@ var executeWriteOperation = function(self, op, ns, ops, options, callback) {
return callback(err);
}

// increment and assign txnNumber
options.txnNumber = txnNumber(options.session);

// rerun the operation
server[op](ns, ops, options, callback);
});
Expand Down
3 changes: 0 additions & 3 deletions lib/topologies/replset.js
Expand Up @@ -1184,9 +1184,6 @@ var executeWriteOperation = function(self, op, ns, ops, options, callback) {
return callback(new MongoError('no primary server found'));
}

// increment and assign txnNumber
options.txnNumber = txnNumber(options.session);

// rerun the operation
self.s.replicaSetState.primary[op](ns, ops, options, callback);
});
Expand Down

0 comments on commit e7c2242

Please sign in to comment.