diff options
author | Matt Boros <matt.boros@mongodb.com> | 2021-12-17 20:35:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-30 16:29:59 +0000 |
commit | c0f12d1a4c98e811b21233f6c8ff7df948056f76 (patch) | |
tree | 7df568f4563a849d35d07716ff36c0231883be0d /jstests | |
parent | d5618f96bdd4630736d8441b38a7287adff8aed7 (diff) | |
download | mongo-c0f12d1a4c98e811b21233f6c8ff7df948056f76.tar.gz |
SERVER-60624 Use unique LSID for each test in txn_commit_optimizations_for_read_only_shards.js
(cherry picked from commit 6e8beaab454ba83cf6123625de45bc0b22fb1079)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/txn_commit_optimizations_for_read_only_shards.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/sharding/txn_commit_optimizations_for_read_only_shards.js b/jstests/sharding/txn_commit_optimizations_for_read_only_shards.js index 9d1eb81d9da..14075fcfd72 100644 --- a/jstests/sharding/txn_commit_optimizations_for_read_only_shards.js +++ b/jstests/sharding/txn_commit_optimizations_for_read_only_shards.js @@ -25,6 +25,10 @@ function waitForLog(logLine, times) { }, 'Failed to find "' + logLine + '" logged ' + times + ' times'); } +function getLSID() { + return {id: UUID()}; +} + const addTxnFields = function(command, lsid, txnNumber, startTransaction) { let txnFields = { lsid: lsid, @@ -102,7 +106,6 @@ assert.commandWorked(st.s.getDB(dbName).runCommand({ documents: [{_id: -1 * MAX_TRANSACTIONS}, {_id: 0}, {_id: MAX_TRANSACTIONS}] })); -let lsid = {id: UUID()}; let txnNumber = 1; const readShard0 = txnNumber => { @@ -355,6 +358,7 @@ for (const failureModeName in failureModes) { continue; } + const lsid = getLSID(); txnNumber++; assert.lt(txnNumber, MAX_TRANSACTIONS, |