summaryrefslogtreecommitdiff
path: root/jstests/replsets/recover_prepared_transactions_startup_secondary_application.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/recover_prepared_transactions_startup_secondary_application.js')
-rw-r--r--jstests/replsets/recover_prepared_transactions_startup_secondary_application.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/replsets/recover_prepared_transactions_startup_secondary_application.js b/jstests/replsets/recover_prepared_transactions_startup_secondary_application.js
index 56f40a8793f..914bbcf324e 100644
--- a/jstests/replsets/recover_prepared_transactions_startup_secondary_application.js
+++ b/jstests/replsets/recover_prepared_transactions_startup_secondary_application.js
@@ -19,6 +19,10 @@ replTest.initiateWithHighElectionTimeout();
const primary = replTest.getPrimary();
let secondary = replTest.getSecondary();
+// The default WC is majority and disableSnapshotting failpoint will prevent satisfying any majority
+// writes.
+assert.commandWorked(primary.adminCommand(
+ {setDefaultRWConcern: 1, defaultWriteConcern: {w: 1}, writeConcern: {w: "majority"}}));
const dbName = "test";
const collName = "recover_prepared_transactions_startup_secondary_application";