diff options
author | Vishnu Kaushik <vishnu.kaushik@mongodb.com> | 2021-04-23 16:56:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-14 19:37:03 +0000 |
commit | 1613cf7f3257e7d933434351f931d3f084ab9ad6 (patch) | |
tree | beda402f0d7d5c3a73c445167a99afcf4662f9cc /jstests | |
parent | cd41bf02ee4f882a800020789128fb4c0cd7bec5 (diff) | |
download | mongo-1613cf7f3257e7d933434351f931d3f084ab9ad6.tar.gz |
SERVER-56310 Use w: majority to ensure transaction uses correct snapshot
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/kill_sessions_with_prepared_transaction.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/replsets/kill_sessions_with_prepared_transaction.js b/jstests/replsets/kill_sessions_with_prepared_transaction.js index a9d32dc73e9..4fe666412e8 100644 --- a/jstests/replsets/kill_sessions_with_prepared_transaction.js +++ b/jstests/replsets/kill_sessions_with_prepared_transaction.js @@ -18,7 +18,7 @@ const primary = rst.getPrimary(); const primaryDB = primary.getDB(dbName); // Create a collection. -assert.commandWorked(primaryDB.createCollection(collName)); +assert.commandWorked(primaryDB.runCommand({create: collName, writeConcern: {w: "majority"}})); const session = primary.startSession(); const sessionDb = session.getDatabase(dbName); |