summaryrefslogtreecommitdiff
path: root/src/mongo/shell/servers.js
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-09-26 11:26:36 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-10-02 10:58:05 -0400
commitaaa64733625433f31a5e212f4652a58816385388 (patch)
tree538d19b094a41d780b56ca1f7f065ad8cc08acf9 /src/mongo/shell/servers.js
parente74ff7028c06686611eb4652a80a212bf14e3757 (diff)
downloadmongo-aaa64733625433f31a5e212f4652a58816385388.tar.gz
SERVER-37227 Reintroduce enableMajorityReadConcern:false server parameter
Diffstat (limited to 'src/mongo/shell/servers.js')
-rw-r--r--src/mongo/shell/servers.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index 317dad5755b..5fcb9e05109 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -649,20 +649,6 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
opts.auditDestination = jsTestOptions().auditDestination;
}
- if (opts.hasOwnProperty("enableMajorityReadConcern")) {
- // opts.enableMajorityReadConcern, if set, must be an empty string
- if (opts.enableMajorityReadConcern !== "") {
- throw new Error("The enableMajorityReadConcern option must be an empty string if " +
- "it is specified");
- }
- } else if (jsTestOptions().enableMajorityReadConcern !== undefined) {
- if (jsTestOptions().enableMajorityReadConcern !== "") {
- throw new Error("The enableMajorityReadConcern option must be an empty string if " +
- "it is specified");
- }
- opts.enableMajorityReadConcern = "";
- }
-
if (opts.noReplSet)
opts.replSet = null;
if (opts.arbiter)
@@ -1170,6 +1156,11 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
if (programName.endsWith('mongod')) {
if (jsTest.options().storageEngine === "wiredTiger" ||
!jsTest.options().storageEngine) {
+ if (!argArrayContains("--enableMajorityReadConcern")) {
+ argArray.push(
+ ...['--enableMajorityReadConcern',
+ jsTest.options().enableMajorityReadConcern.toString()]);
+ }
if (jsTest.options().storageEngineCacheSizeGB &&
!argArrayContains('--wiredTigerCacheSizeGB')) {
argArray.push(...['--wiredTigerCacheSizeGB',