diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2016-02-18 13:56:20 -0500 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2016-02-23 12:45:05 -0500 |
commit | 4ac60aebdd0c9bdb48dbb8cab68f6e762e1b23e7 (patch) | |
tree | 27cf4df02b2a80a8b659ee9abae73adbdc20617e /src/mongo/db/mongod_options.cpp | |
parent | 84aaba3d523cf2eeeca197d7e41c714229ee0bdd (diff) | |
download | mongo-4ac60aebdd0c9bdb48dbb8cab68f6e762e1b23e7.tar.gz |
SERVER-22357 disable journal in readOnly mode
Diffstat (limited to 'src/mongo/db/mongod_options.cpp')
-rw-r--r-- | src/mongo/db/mongod_options.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp index 0f787f4275f..1628b9737a0 100644 --- a/src/mongo/db/mongod_options.cpp +++ b/src/mongo/db/mongod_options.cpp @@ -669,6 +669,9 @@ Status validateMongodOptions(const moe::Environment& params) { "source", "only", "slavedelay", + "journal", + "storage.journal.enabled", + "dur", "autoresync", "fastsync"}) { if (params.count(disallowedOption)) { @@ -1046,8 +1049,9 @@ Status storeMongodOptions(const moe::Environment& params, const std::vector<std: storageGlobalParams.directoryperdb = params["storage.directoryPerDB"].as<bool>(); } - if (params.count("storage.readOnly")) { - storageGlobalParams.readOnly = params["storage.readOnly"].as<bool>(); + if (params.count("storage.readOnly") && params["storage.readOnly"].as<bool>()) { + storageGlobalParams.readOnly = true; + storageGlobalParams.dur = false; } if (params.count("cpu")) { |