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

Commit

Permalink
fix(mongos): use incrementTransactionNumber directly on session
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Apr 17, 2018
1 parent 2e1e09f commit e230d54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/topologies/mongos.js
Expand Up @@ -15,7 +15,6 @@ const cloneOptions = require('./shared').cloneOptions;
const createClientInfo = require('./shared').createClientInfo;
const SessionMixins = require('./shared').SessionMixins;
const isRetryableWritesSupported = require('./shared').isRetryableWritesSupported;
const incrementTransactionNumber = require('./shared').incrementTransactionNumber;
const relayEvents = require('./shared').relayEvents;
const BSON = retrieveBSON();

Expand Down Expand Up @@ -908,7 +907,7 @@ var executeWriteOperation = function(self, op, ns, ops, options, callback) {
}

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

server[op](ns, ops, options, (err, result) => {
if (!err) return callback(null, result);
Expand Down

0 comments on commit e230d54

Please sign in to comment.