summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishnu Kaushik <vishnu.kaushik@mongodb.com>2021-04-23 16:56:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-14 19:31:27 +0000
commit923c41a78246fe99e3a6605946cf1f6d7cd82395 (patch)
tree1bf6cfe54514faaa4dce8712a89eda0ffd2b32e5
parent3cca88dff1b3ec2eb3dcda6eb8a4627c76566850 (diff)
downloadmongo-923c41a78246fe99e3a6605946cf1f6d7cd82395.tar.gz
SERVER-56310 Use w: majority to ensure transaction uses correct snapshot
-rw-r--r--jstests/replsets/kill_sessions_with_prepared_transaction.js2
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);