From e7c2242414972dbc5472ccdfb3c01b86b57d0071 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Tue, 28 Nov 2017 12:46:40 -0500 Subject: [PATCH] fix(retryable-writes): don't increment `txnNumber` on retries NODE-1105 --- lib/topologies/mongos.js | 3 --- lib/topologies/replset.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/lib/topologies/mongos.js b/lib/topologies/mongos.js index 60cc4764d..1c612156e 100644 --- a/lib/topologies/mongos.js +++ b/lib/topologies/mongos.js @@ -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); }); diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js index 77ddf70ba..673091fc0 100644 --- a/lib/topologies/replset.js +++ b/lib/topologies/replset.js @@ -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); });