summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_options.cpp
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2015-05-26 20:27:50 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2015-05-26 20:27:50 -0400
commita335b35b2e95538220941960764e6f60136b3973 (patch)
tree7f032302b5258df827e2cbfd726584414e88ae57 /src/mongo/db/mongod_options.cpp
parent3a54c4caa2a5b0d0689a73de0fad3b6be84b5a8c (diff)
downloadmongo-a335b35b2e95538220941960764e6f60136b3973.tar.gz
SERVER-17861 Change the default storage engine to wiredTiger.
WiredTiger is used as the default storage engine if the dbpath does not contain any data files. Otherwise, the storage engine specified in the storage.bson metadata file is used when the --storageEngine flag is omitted from the command line invocation.
Diffstat (limited to 'src/mongo/db/mongod_options.cpp')
-rw-r--r--src/mongo/db/mongod_options.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp
index bb283121bf3..a2daab9c201 100644
--- a/src/mongo/db/mongod_options.cpp
+++ b/src/mongo/db/mongod_options.cpp
@@ -165,8 +165,7 @@ namespace mongo {
// Storage Options
storage_options.addOptionChaining("storage.engine", "storageEngine", moe::String,
- "what storage engine to use")
- .setDefault(moe::Value(std::string("mmapv1")));
+ "what storage engine to use - defaults to wiredTiger if no data files present");
#ifdef _WIN32
@@ -894,7 +893,10 @@ namespace mongo {
"files");
}
- storageGlobalParams.engine = params["storage.engine"].as<string>();
+ if (params.count("storage.engine")) {
+ storageGlobalParams.engine = params["storage.engine"].as<string>();
+ storageGlobalParams.engineSetByUser = true;
+ }
if (params.count("storage.dbPath")) {
storageGlobalParams.dbpath = params["storage.dbPath"].as<string>();