summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2015-02-23 17:58:21 -0500
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-02-24 13:34:56 -0500
commit54f2c659779bfde7f7891f624d74c1eb01668b39 (patch)
treee412debca684844c0e14e421ce51a8a25efa0053
parentb298ab8bf747c160636298f6143e221c6f7ee3fa (diff)
downloadmongo-54f2c659779bfde7f7891f624d74c1eb01668b39.tar.gz
SERVER-17356 Rename 'storageEngine' to 'storage' in collection and index options
(cherry picked from commit aa207c8f93ca264fd292980defca1cff315f2a47)
-rw-r--r--jstests/core/apitest_db.js14
-rw-r--r--jstests/sharding/sharding_system_namespaces.js4
-rw-r--r--src/mongo/db/catalog/collection_options.cpp24
-rw-r--r--src/mongo/db/catalog/collection_options.h4
-rw-r--r--src/mongo/db/catalog/collection_options_test.cpp54
-rw-r--r--src/mongo/db/catalog/database.cpp2
-rw-r--r--src/mongo/db/catalog/index_catalog.cpp6
-rw-r--r--src/mongo/db/global_environment_experiment.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp6
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp10
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp6
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store_test.cpp4
-rw-r--r--src/mongo/dbtests/indexupdatetests.cpp14
15 files changed, 77 insertions, 79 deletions
diff --git a/jstests/core/apitest_db.js b/jstests/core/apitest_db.js
index f12f44c1aed..3c272db34fc 100644
--- a/jstests/core/apitest_db.js
+++ b/jstests/core/apitest_db.js
@@ -38,23 +38,23 @@ var found = false;
db.getCollectionNames().forEach( function(x) { if (x == "test") found = true; });
assert(found, "found test.test in collection infos");
-// storageEngine in collection options must:
+// 'storage' in collection options must:
// - be a document
// - contain at least one field of document type with the name of a registered storage engine.
db.getCollection('test').drop();
var storageEngineName = db.serverStatus().storageEngine.name;
-assert.commandFailed(db.createCollection('test', {storageEngine: {}}));
-assert.commandFailed(db.createCollection('test', {storageEngine: {unknownStorageEngine: {}}}));
+assert.commandFailed(db.createCollection('test', {storage: {}}));
+assert.commandFailed(db.createCollection('test', {storage: {unknownStorageEngine: {}}}));
var invalidStorageEngineOptions = {}
invalidStorageEngineOptions[storageEngineName] = 12345;
-assert.commandFailed(db.createCollection('test', {storageEngine: invalidStorageEngineOptions}));
+assert.commandFailed(db.createCollection('test', {storage: invalidStorageEngineOptions}));
-// Test round trip of storageEngine in collection options.
+// Test round trip of 'storage' in collection options.
// Assume that empty document for storageEngine-specific options is acceptable.
var validStorageEngineOptions = {}
validStorageEngineOptions[storageEngineName] = {};
db.getCollection('test').drop();
-assert.commandWorked(db.createCollection('test', {storageEngine: validStorageEngineOptions}));
+assert.commandWorked(db.createCollection('test', {storage: validStorageEngineOptions}));
var collections = db.getCollectionInfos();
found = false;
for (var i = 0; i < collections.length; ++i) {
@@ -63,7 +63,7 @@ for (var i = 0; i < collections.length; ++i) {
continue;
}
found = true;
- assert.docEq(validStorageEngineOptions, collection.options.storageEngine,
+ assert.docEq(validStorageEngineOptions, collection.options.storage,
'storage engine options not found in listCommands result');
}
assert(found, "'test' collection not created");
diff --git a/jstests/sharding/sharding_system_namespaces.js b/jstests/sharding/sharding_system_namespaces.js
index 7d8121da24a..a880d15a6f0 100644
--- a/jstests/sharding/sharding_system_namespaces.js
+++ b/jstests/sharding/sharding_system_namespaces.js
@@ -27,12 +27,12 @@ if (db.serverBuildInfo().bits != 32) {
var info = collectionsInfos.filter(function(c) {
return c.name == "sharding_system_namespaces";
})[0];
- assert.eq(info.options.storageEngine.wiredTiger.configString, "block_compressor=zlib");
+ assert.eq(info.options.storage.wiredTiger.configString, "block_compressor=zlib");
}
db.createCollection("sharding_system_namespaces",
{
- storageEngine: {
+ storage: {
wiredTiger: { configString: "block_compressor=zlib" }
}
});
diff --git a/src/mongo/db/catalog/collection_options.cpp b/src/mongo/db/catalog/collection_options.cpp
index ba2a3ff5b6e..570daa5a103 100644
--- a/src/mongo/db/catalog/collection_options.cpp
+++ b/src/mongo/db/catalog/collection_options.cpp
@@ -62,7 +62,7 @@ namespace mongo {
flags = Flag_UsePowerOf2Sizes;
flagsSet = false;
temp = false;
- storageEngine = BSONObj();
+ storage = BSONObj();
}
Status CollectionOptions::parse(const BSONObj& options) {
@@ -124,14 +124,14 @@ namespace mongo {
else if ( fieldName == "temp" ) {
temp = e.trueValue();
}
- else if (fieldName == "storageEngine") {
+ else if (fieldName == "storage") {
// Storage engine-specific collection options.
- // "storageEngine" field must be of type "document".
- // Every field inside "storageEngine" has to be a document.
+ // "storage" field must be of type "document".
+ // Every field inside "storage" has to be a document.
// Format:
// {
// ...
- // storageEngine: {
+ // storage: {
// storageEngine1: {
// ...
// },
@@ -142,26 +142,26 @@ namespace mongo {
// ...
// }
if (e.type() != mongo::Object) {
- return Status(ErrorCodes::BadValue, "'storageEngine' has to be a document.");
+ return Status(ErrorCodes::BadValue, "'storage' has to be a document.");
}
BSONObjIterator j(e.Obj());
if (!j.more()) {
return Status(ErrorCodes::BadValue,
- "Empty 'storageEngine' options are invalid. "
+ "Empty 'storage' options are invalid. "
"Please remove, or include valid options.");
}
- // Loop through each provided storageEngine.
+ // Loop through each provided storage.
while (j.more()) {
BSONElement storageEngineElement = j.next();
StringData storageEngineName = storageEngineElement.fieldNameStringData();
if (storageEngineElement.type() != mongo::Object) {
- return Status(ErrorCodes::BadValue, str::stream() << "'storageEngine." <<
+ return Status(ErrorCodes::BadValue, str::stream() << "'storage." <<
storageEngineName << "' has to be an embedded document.");
}
}
- storageEngine = e.Obj().getOwned();
+ storage = e.Obj().getOwned();
}
}
@@ -192,8 +192,8 @@ namespace mongo {
if ( temp )
b.appendBool( "temp", true );
- if (!storageEngine.isEmpty()) {
- b.append("storageEngine", storageEngine);
+ if (!storage.isEmpty()) {
+ b.append("storage", storage);
}
return b.obj();
diff --git a/src/mongo/db/catalog/collection_options.h b/src/mongo/db/catalog/collection_options.h
index 09d53a5774b..b8128e1a487 100644
--- a/src/mongo/db/catalog/collection_options.h
+++ b/src/mongo/db/catalog/collection_options.h
@@ -44,8 +44,6 @@ namespace mongo {
/**
* Updates fields based on BSON document from client.
- * If document contains a 'storageEngine' field, ensures that 'storageEngine'
- * contains a single field of Object type.
*/
Status parse( const BSONObj& obj );
@@ -86,7 +84,7 @@ namespace mongo {
bool temp;
// Storage engine collection options. Always owned or empty.
- BSONObj storageEngine;
+ BSONObj storage;
};
}
diff --git a/src/mongo/db/catalog/collection_options_test.cpp b/src/mongo/db/catalog/collection_options_test.cpp
index 4bb94af2478..d91b94d57cc 100644
--- a/src/mongo/db/catalog/collection_options_test.cpp
+++ b/src/mongo/db/catalog/collection_options_test.cpp
@@ -86,41 +86,41 @@ namespace mongo {
}
TEST(CollectionOptions, InvalidStorageEngineField) {
- // "storageEngine" field has to be an object if present.
- ASSERT_NOT_OK( CollectionOptions().parse(fromjson("{storageEngine: 1}")));
+ // "storage" field has to be an object if present.
+ ASSERT_NOT_OK( CollectionOptions().parse(fromjson("{storage: 1}")));
- // Every field under "storageEngine" has to be an object.
+ // Every field under "storage" has to be an object.
ASSERT_NOT_OK( CollectionOptions().parse(fromjson(
- "{storageEngine: {storageEngine1: 1}}")));
+ "{storage: {storageEngine1: 1}}")));
- // Empty "storageEngine" not allowed
+ // Empty "storage" not allowed
ASSERT_NOT_OK( CollectionOptions().parse(fromjson(
- "{storageEngine: {}}")));
+ "{storage: {}}")));
}
TEST(CollectionOptions, ParseEngineField) {
CollectionOptions opts;
ASSERT_OK(opts.parse(fromjson("{unknownField: 1, "
- "storageEngine: {storageEngine1: {x: 1, y: 2}, storageEngine2: {a: 1, b:2}}}")));
+ "storage: {storageEngine1: {x: 1, y: 2}, storageEngine2: {a: 1, b:2}}}")));
checkRoundTrip(opts);
// Unrecognized field should not be present in BSON representation.
BSONObj obj = opts.toBSON();
ASSERT_FALSE(obj.hasField("unknownField"));
- // Check "storageEngine" field.
- ASSERT_TRUE(obj.hasField("storageEngine"));
- ASSERT_TRUE(obj.getField("storageEngine").isABSONObj());
- BSONObj storageEngine = obj.getObjectField("storageEngine");
+ // Check "storage" field.
+ ASSERT_TRUE(obj.hasField("storage"));
+ ASSERT_TRUE(obj.getField("storage").isABSONObj());
+ BSONObj storage = obj.getObjectField("storage");
- // Check individual storage storageEngine fields.
- ASSERT_TRUE(storageEngine.getField("storageEngine1").isABSONObj());
- BSONObj storageEngine1 = storageEngine.getObjectField("storageEngine1");
+ // Check individual storage fields.
+ ASSERT_TRUE(storage.getField("storageEngine1").isABSONObj());
+ BSONObj storageEngine1 = storage.getObjectField("storageEngine1");
ASSERT_EQUALS(1, storageEngine1.getIntField("x"));
ASSERT_EQUALS(2, storageEngine1.getIntField("y"));
- ASSERT_TRUE(storageEngine.getField("storageEngine2").isABSONObj());
- BSONObj storageEngine2 = storageEngine.getObjectField("storageEngine2");
+ ASSERT_TRUE(storage.getField("storageEngine2").isABSONObj());
+ BSONObj storageEngine2 = storage.getObjectField("storageEngine2");
ASSERT_EQUALS(1, storageEngine2.getIntField("a"));
ASSERT_EQUALS(2, storageEngine2.getIntField("b"));
@@ -129,32 +129,32 @@ namespace mongo {
TEST(CollectionOptions, ResetStorageEngineField) {
CollectionOptions opts;
ASSERT_OK(opts.parse(fromjson(
- "{storageEngine: {storageEngine1: {x: 1}}}")));
+ "{storage: {storageEngine1: {x: 1}}}")));
checkRoundTrip(opts);
opts.reset();
- ASSERT_TRUE(opts.storageEngine.isEmpty());
+ ASSERT_TRUE(opts.storage.isEmpty());
}
TEST(CollectionOptions, ModifyStorageEngineField) {
CollectionOptions opts;
- // Directly modify storageEngine field in collection options.
- opts.storageEngine = fromjson("{storageEngine1: {x: 1}}");
+ // Directly modify storage field in collection options.
+ opts.storage = fromjson("{storageEngine1: {x: 1}}");
// Unrecognized field should not be present in BSON representation.
BSONObj obj = opts.toBSON();
ASSERT_FALSE(obj.hasField("unknownField"));
- // Check "storageEngine" field.
- ASSERT_TRUE(obj.hasField("storageEngine"));
- ASSERT_TRUE(obj.getField("storageEngine").isABSONObj());
- BSONObj storageEngine = obj.getObjectField("storageEngine");
+ // Check "storage" field.
+ ASSERT_TRUE(obj.hasField("storage"));
+ ASSERT_TRUE(obj.getField("storage").isABSONObj());
+ BSONObj storage = obj.getObjectField("storage");
- // Check individual storage storageEngine fields.
- ASSERT_TRUE(storageEngine.getField("storageEngine1").isABSONObj());
- BSONObj storageEngine1 = storageEngine.getObjectField("storageEngine1");
+ // Check individual storage fields.
+ ASSERT_TRUE(storage.getField("storageEngine1").isABSONObj());
+ BSONObj storageEngine1 = storage.getObjectField("storageEngine1");
ASSERT_EQUALS(1, storageEngine1.getIntField("x"));
}
}
diff --git a/src/mongo/db/catalog/database.cpp b/src/mongo/db/catalog/database.cpp
index 726032a46c0..a67e3f91f1b 100644
--- a/src/mongo/db/catalog/database.cpp
+++ b/src/mongo/db/catalog/database.cpp
@@ -616,7 +616,7 @@ namespace mongo {
if ( !status.isOK() )
return status;
- status = validateStorageOptions(collectionOptions.storageEngine,
+ status = validateStorageOptions(collectionOptions.storage,
&StorageEngine::Factory::validateCollectionStorageOptions);
if ( !status.isOK() )
return status;
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp
index 3e00ed23121..f8504739c04 100644
--- a/src/mongo/db/catalog/index_catalog.cpp
+++ b/src/mongo/db/catalog/index_catalog.cpp
@@ -537,17 +537,17 @@ namespace {
}
}
- BSONElement storageEngineElement = spec.getField("storageEngine");
+ BSONElement storageEngineElement = spec.getField("storage");
if (storageEngineElement.eoo()) {
return Status::OK();
}
if (storageEngineElement.type() != mongo::Object) {
- return Status(ErrorCodes::BadValue, "'storageEngine' has to be a document.");
+ return Status(ErrorCodes::BadValue, "'storage' has to be a document.");
}
BSONObj storageEngineOptions = storageEngineElement.Obj();
if (storageEngineOptions.isEmpty()) {
return Status(ErrorCodes::BadValue,
- "Empty 'storageEngine' options are invalid. "
+ "Empty 'storage' options are invalid. "
"Please remove, or include valid options.");
}
diff --git a/src/mongo/db/global_environment_experiment.cpp b/src/mongo/db/global_environment_experiment.cpp
index 8fa6ad696db..8822149893e 100644
--- a/src/mongo/db/global_environment_experiment.cpp
+++ b/src/mongo/db/global_environment_experiment.cpp
@@ -87,7 +87,7 @@ namespace mongo {
StringData storageEngineName = storageElement.fieldNameStringData();
if (storageElement.type() != mongo::Object) {
return Status(ErrorCodes::BadValue, str::stream()
- << "'storageEngine." << storageElement.fieldNameStringData()
+ << "'storage." << storageElement.fieldNameStringData()
<< "' has to be an embedded document.");
}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
index 0f854078e07..96a2e9970e8 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
@@ -161,11 +161,11 @@ namespace {
// Raise an error about unrecognized fields that may be introduced in newer versions of
// this storage engine.
// Ensure that 'configString' field is a string. Raise an error if this is not the case.
- BSONElement storageEngineElement = desc.getInfoElement("storageEngine");
+ BSONElement storageEngineElement = desc.getInfoElement("storage");
if (storageEngineElement.isABSONObj()) {
- BSONObj storageEngine = storageEngineElement.Obj();
+ BSONObj storage = storageEngineElement.Obj();
StatusWith<std::string> parseStatus =
- parseIndexOptions(storageEngine.getObjectField(kWiredTigerEngineName));
+ parseIndexOptions(storage.getObjectField(kWiredTigerEngineName));
if (!parseStatus.isOK()) {
return parseStatus;
}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.h b/src/mongo/db/storage/wiredtiger/wiredtiger_index.h
index 81f6aa57c1f..e61e295cd29 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.h
@@ -47,7 +47,7 @@ namespace mongo {
/**
* Parses index options for wired tiger configuration string suitable for table creation.
- * The document 'options' is typically obtained from the 'storageEngine.wiredTiger' field
+ * The document 'options' is typically obtained from the 'storage.wiredTiger' field
* of an IndexDescriptor's info object.
*/
static StatusWith<std::string> parseIndexOptions(const BSONObj& options);
@@ -57,7 +57,7 @@ namespace mongo {
* Configuration string is constructed from:
* built-in defaults
* 'extraConfig'
- * storageEngine.wiredTiger.configString in index descriptor's info object.
+ * storage.wiredTiger.configString in index descriptor's info object.
* Performs simple validation on the supplied parameters.
* Returns error status if validation fails.
* Note that even if this function returns an OK status, WT_SESSION:create() may still
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
index 11e14e6b33e..873f4577764 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
@@ -101,7 +101,7 @@ namespace mongo {
}
TEST(WiredTigerIndexTest, GenerateCreateStringEmptyDocument) {
- BSONObj spec = fromjson("{storageEngine: {wiredTiger: {}}}");
+ BSONObj spec = fromjson("{storage: {wiredTiger: {}}}");
IndexDescriptor desc(NULL, "", spec);
StatusWith<std::string> result = WiredTigerIndex::generateCreateString("", desc);
const Status& status = result.getStatus();
@@ -110,7 +110,7 @@ namespace mongo {
}
TEST(WiredTigerIndexTest, GenerateCreateStringUnknownField) {
- BSONObj spec = fromjson("{storageEngine: {wiredTiger: {unknownField: 1}}}");
+ BSONObj spec = fromjson("{storage: {wiredTiger: {unknownField: 1}}}");
IndexDescriptor desc(NULL, "", spec);
StatusWith<std::string> result = WiredTigerIndex::generateCreateString("", desc);
const Status& status = result.getStatus();
@@ -119,7 +119,7 @@ namespace mongo {
}
TEST(WiredTigerIndexTest, GenerateCreateStringNonStringConfig) {
- BSONObj spec = fromjson("{storageEngine: {wiredTiger: {configString: 12345}}}");
+ BSONObj spec = fromjson("{storage: {wiredTiger: {configString: 12345}}}");
IndexDescriptor desc(NULL, "", spec);
StatusWith<std::string> result = WiredTigerIndex::generateCreateString("", desc);
const Status& status = result.getStatus();
@@ -128,7 +128,7 @@ namespace mongo {
}
TEST(WiredTigerIndexTest, GenerateCreateStringEmptyConfigString) {
- BSONObj spec = fromjson("{storageEngine: {wiredTiger: {configString: ''}}}");
+ BSONObj spec = fromjson("{storage: {wiredTiger: {configString: ''}}}");
IndexDescriptor desc(NULL, "", spec);
StatusWith<std::string> result = WiredTigerIndex::generateCreateString("", desc);
const Status& status = result.getStatus();
@@ -137,7 +137,7 @@ namespace mongo {
}
TEST(WiredTigerIndexTest, GenerateCreateStringValidConfigFormat) {
- BSONObj spec = fromjson("{storageEngine: {wiredTiger: {configString: 'abc=def'}}}");
+ BSONObj spec = fromjson("{storage: {wiredTiger: {configString: 'abc=def'}}}");
IndexDescriptor desc(NULL, "", spec);
StatusWith<std::string> result = WiredTigerIndex::generateCreateString("", desc);
const Status& status = result.getStatus();
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
index b22573b2826..594a6608427 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
@@ -118,11 +118,11 @@ namespace {
// Warn about unrecognized fields that may be introduced in newer versions of this
// storage engine instead of raising an error.
// Ensure that 'configString' field is a string. Warn if this is not the case.
- BSONForEach(elem, options.storageEngine.getObjectField(kWiredTigerEngineName)) {
+ BSONForEach(elem, options.storage.getObjectField(kWiredTigerEngineName)) {
if (elem.fieldNameStringData() == "configString") {
if (elem.type() != String) {
return StatusWith<std::string>(ErrorCodes::TypeMismatch, str::stream()
- << "storageEngine.wiredTiger.configString "
+ << "storage.wiredTiger.configString "
<< "must be a string. "
<< "Not adding 'configString' value "
<< elem << " to collection configuration");
@@ -135,7 +135,7 @@ namespace {
return StatusWith<std::string>(ErrorCodes::InvalidOptions, str::stream()
<< '\'' << elem.fieldNameStringData() << '\''
<< " is not a supported option in "
- << "storageEngine.wiredTiger");
+ << "storage.wiredTiger");
}
}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
index e076db94728..666548324a6 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
@@ -72,7 +72,7 @@ namespace mongo {
* Creates a configuration string suitable for 'config' parameter in WT_SESSION::create().
* Configuration string is constructed from:
* built-in defaults
- * storageEngine.wiredTiger.configString in 'options'
+ * storage.wiredTiger.configString in 'options'
* 'extraStrings'
* Performs simple validation on the supplied parameters.
* Returns error status if validation fails.
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_test.cpp
index efecfe86c56..f884e51f6b5 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_test.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_test.cpp
@@ -152,7 +152,7 @@ namespace mongo {
TEST(WiredTigerRecordStoreTest, GenerateCreateStringUnknownField) {
CollectionOptions options;
- options.storageEngine = fromjson("{wiredTiger: {unknownField: 1}}");
+ options.storage = fromjson("{wiredTiger: {unknownField: 1}}");
StatusWith<std::string> result = WiredTigerRecordStore::generateCreateString("", options, "");
const Status& status = result.getStatus();
ASSERT_NOT_OK(status);
@@ -161,7 +161,7 @@ namespace mongo {
TEST(WiredTigerRecordStoreTest, GenerateCreateStringNonStringConfig) {
CollectionOptions options;
- options.storageEngine = fromjson("{wiredTiger: {configString: 12345}}");
+ options.storage = fromjson("{wiredTiger: {configString: 12345}}");
StatusWith<std::string> result = WiredTigerRecordStore::generateCreateString("", options, "");
const Status& status = result.getStatus();
ASSERT_NOT_OK(status);
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp
index 30ac55d7389..0fb0a165ca0 100644
--- a/src/mongo/dbtests/indexupdatetests.cpp
+++ b/src/mongo/dbtests/indexupdatetests.cpp
@@ -853,23 +853,23 @@ namespace IndexUpdateTests {
class StorageEngineOptions : public IndexBuildBase {
public:
void run() {
- // "storageEngine" field has to be an object if present.
+ // "storage" field has to be an object if present.
ASSERT_NOT_OK(createIndex("unittest", _createSpec(12345)));
- // 'storageEngine' must not be empty.
+ // 'storage' must not be empty.
ASSERT_NOT_OK(createIndex("unittest", _createSpec(BSONObj())));
- // Every field under "storageEngine" must match a registered storage engine.
+ // Every field under "storage" must match a registered storage engine.
ASSERT_NOT_OK(createIndex("unittest",
_createSpec(BSON("unknownEngine" << BSONObj()))));
// Testing with 'wiredTiger' because the registered storage engine factory
- // supports custom index options under 'storageEngine'.
+ // supports custom index options under 'storage'.
const std::string storageEngineName = "wiredTiger";
// Run 'wiredTiger' tests if the storage engine is supported.
if (getGlobalEnvironment()->isRegisteredStorageEngine(storageEngineName)) {
- // Every field under "storageEngine" has to be an object.
+ // Every field under "storage" has to be an object.
ASSERT_NOT_OK(createIndex("unittest", _createSpec(BSON(storageEngineName << 1))));
// Storage engine options must pass validation by the storage engine factory.
@@ -888,11 +888,11 @@ namespace IndexUpdateTests {
}
protected:
template <typename T>
- BSONObj _createSpec(T storageEngineValue) {
+ BSONObj _createSpec(T storageValue) {
return BSON("name" << "super2"
<< "ns" << _ns
<< "key" << BSON("a" << 1)
- << "storageEngine" << storageEngineValue);
+ << "storage" << storageValue);
}
};