From 923c41a78246fe99e3a6605946cf1f6d7cd82395 Mon Sep 17 00:00:00 2001 From: Vishnu Kaushik Date: Fri, 23 Apr 2021 16:56:08 +0000 Subject: SERVER-56310 Use w: majority to ensure transaction uses correct snapshot --- jstests/replsets/kill_sessions_with_prepared_transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1