summaryrefslogtreecommitdiff
path: root/jstests/replsets/rslib.js
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2016-11-21 15:02:26 -0500
committerWilliam Schultz <william.schultz@mongodb.com>2016-12-01 12:53:47 -0500
commit58921178cd9b8d69509770ded5f224d5b87c5a91 (patch)
treedda51ee7a257eafeed7c6b9a74721ca5d4ec4b2a /jstests/replsets/rslib.js
parent3995266ca0555040023fdc003e4334cbff856598 (diff)
downloadmongo-58921178cd9b8d69509770ded5f224d5b87c5a91.tar.gz
SERVER-27117 Set writeConcernMajorityJournalDefault to false for non journal variants
Diffstat (limited to 'jstests/replsets/rslib.js')
-rw-r--r--jstests/replsets/rslib.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/jstests/replsets/rslib.js b/jstests/replsets/rslib.js
index d60f86462bf..beebf99159a 100644
--- a/jstests/replsets/rslib.js
+++ b/jstests/replsets/rslib.js
@@ -7,7 +7,6 @@ var reconfig;
var awaitOpTime;
var startSetIfSupportsReadMajority;
var waitUntilAllNodesCaughtUp;
-var updateConfigIfNotDurable;
var reInitiateWithoutThrowingOnAbortedMember;
var awaitRSClientHosts;
var getLastOpTime;
@@ -121,7 +120,8 @@ var getLastOpTime;
var e;
var master;
try {
- assert.commandWorked(admin.runCommand({replSetReconfig: config, force: force}));
+ assert.commandWorked(admin.runCommand(
+ {replSetReconfig: rs._updateConfigIfNotDurable(config), force: force}));
} catch (e) {
if (tojson(e).indexOf("error doing query: failed") < 0) {
throw e;
@@ -234,19 +234,6 @@ var getLastOpTime;
};
/**
- * Changes the replica set config if journaling/ephemal storage engine to set
- * writeConcernMajorityJournalDefault to false.
- */
- updateConfigIfNotDurable = function(config) {
- var runningWithoutJournaling = TestData.noJournal ||
- 0 != ["inMemory", "ephemeralForTest"].filter((a) => a == TestData.storageEngine).length;
- if (runningWithoutJournaling) {
- config.writeConcernMajorityJournalDefault = false;
- }
- return config;
- };
-
- /**
* Performs a reInitiate() call on 'replSetTest', ignoring errors that are related to an aborted
* secondary member. All other errors are rethrown.
*/