Skip to content

Commit

Permalink
Revert "SERVER-17861 Change the default storage engine to wiredTiger."
Browse files Browse the repository at this point in the history
This reverts commit a335b35.
  • Loading branch information
visemet committed May 27, 2015
1 parent a335b35 commit 12d9dea
Show file tree
Hide file tree
Showing 31 changed files with 283 additions and 312 deletions.
6 changes: 0 additions & 6 deletions buildscripts/resmokeconfig/suites/disk.yml
Expand Up @@ -7,11 +7,6 @@ selector:

executor:
js_test:
config:
shell_options:
global_vars:
TestData:
storageEngine: mmapv1
hooks:
- class: CleanEveryN
n: 20
Expand All @@ -21,4 +16,3 @@ executor:
nopreallocj: ''
set_parameters:
enableTestCommands: 1
storageEngine: mmapv1
3 changes: 0 additions & 3 deletions buildscripts/resmokeconfig/suites/durability.yml
Expand Up @@ -11,7 +11,4 @@ executor:
js_test:
config:
shell_options:
global_vars:
TestData:
storageEngine: mmapv1
nodb: ''
5 changes: 0 additions & 5 deletions buildscripts/resmokeconfig/suites/mmap.yml
Expand Up @@ -5,11 +5,6 @@ selector:

executor:
js_test:
config:
shell_options:
global_vars:
TestData:
storageEngine: mmapv1
hooks:
- class: CleanEveryN
n: 20
Expand Down
16 changes: 12 additions & 4 deletions etc/evergreen.yml
Expand Up @@ -624,7 +624,15 @@ tasks:
- func: "do setup"
- func: "run tests"
vars:
resmoke_args: -j8 --suites=core_auth
resmoke_args: -j8 --suites=core_auth --storageEngine=mmapv1

- <<: *task_template
name: jsCore_auth_WT
commands:
- func: "do setup"
- func: "run tests"
vars:
resmoke_args: -j8 --suites=core_auth --storageEngine=wiredTiger

- <<: *task_template
name: jsCore_op_command
Expand Down Expand Up @@ -2110,7 +2118,7 @@ buildvariants:
push_arch: i686
compile_flags: --release --distarch=i686 -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ --variant-dir="linux2/release" --wiredtiger=off CCFLAGS="-m32" LINKFLAGS="-m32"
num_jobs_unittests: $(grep -c ^processor /proc/cpuinfo)
test_flags: --continueOnFailure --storageEngine=mmapv1 -j1 # Avoid starting too many mongod's on 32-bit systems.
test_flags: --continueOnFailure -j1 # Avoid starting too many mongod's on 32-bit systems.
has_debugsymbols: true
tasks:
- name: compile
Expand Down Expand Up @@ -2147,7 +2155,7 @@ buildvariants:
push_name: linux-debug
push_arch: i686
num_jobs_unittests: $(grep -c ^processor /proc/cpuinfo)
test_flags: --continueOnFailure --storageEngine=mmapv1 -j1 # Avoid starting too many mongod's on 32-bit systems.
test_flags: --continueOnFailure -j1 # Avoid starting too many mongod's on 32-bit systems.
has_debugsymbols: true
compile_flags: --dbg=on --distarch=i686 --opt=on -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ --variant-dir="linux2/debug" --wiredtiger=off CCFLAGS="-m32" LINKFLAGS="-m32"
tasks:
Expand Down Expand Up @@ -2526,7 +2534,7 @@ buildvariants:
content_type: application/zip
compile_flags: --release -j$(grep -c ^processor /proc/cpuinfo) --wiredtiger=off TARGET_ARCH=i386 --variant-dir=win32
num_jobs_unittests: $(grep -c ^processor /proc/cpuinfo)
test_flags: --continueOnFailure --storageEngine=mmapv1 -j1 # Avoid starting too many mongod's on 32-bit systems.
test_flags: --continueOnFailure -j1 # Avoid starting too many mongod's on 32-bit systems.
ext: zip
# TODO: Remove the "is_windows" expansion after PyYAML is installed on all build variants.
is_windows: true
Expand Down
6 changes: 2 additions & 4 deletions jstests/core/apitest_dbcollection.js
Expand Up @@ -193,10 +193,8 @@ assert(db.getCollection( "test_db" ).getIndexes().length == 0,24);
'indexDetails missing from ' + 'db.collection.stats(' + tojson(options) +
') result: ' + tojson(collectionStats));
// Currently, indexDetails is only supported with WiredTiger.
var storageEngine = jsTest.options().storageEngine;
if (storageEngine && storageEngine !== 'wiredTiger') {
return;
}
if (jsTest.options().storageEngine == undefined) { return; }
if (jsTest.options().storageEngine.toLowerCase() != "wiredtiger") { return; }
assert.eq(1, Object.keys(collectionStats.indexDetails).length,
'indexDetails must have exactly one entry');
assert(collectionStats.indexDetails[indexName],
Expand Down
2 changes: 1 addition & 1 deletion jstests/multiVersion/downgrade_replset.js
Expand Up @@ -12,7 +12,7 @@ var nodes = {n1: {binVersion: newVersion},
n2: {binVersion: newVersion},
n3: {binVersion: newVersion}};

var rst = new ReplSetTest({name: name, nodes: nodes, nodeOptions: {storageEngine: 'mmapv1'}});
var rst = new ReplSetTest({name: name, nodes: 3});
rst.startSet();
rst.initiate();

Expand Down
78 changes: 57 additions & 21 deletions jstests/multiVersion/libs/verify_collection_data.js
Expand Up @@ -68,61 +68,97 @@ createCollectionWithData = function (db, collectionName, dataGenerator) {
// the saved state
function CollectionDataValidator() {

var _initialized = false;
var _collectionInfo = {};
var _indexData = [];
var _collectionData = [];

// Returns the options of the specified collection.
this.getCollectionInfo = function(collection) {
var infoObj = collection.getDB().getCollectionInfos({name: collection.getName()});
assert.eq(1, infoObj.length, "expected collection '" + collection.getName() + "'to exist");
return infoObj[0];
};
var initialized = false;
var collectionStats = {};
var indexData = [];
var collectionData = [];

// Saves the current state of the collection passed in
this.recordCollectionData = function (collection) {
// Save the metadata for this collection for later comparison.
_collectionInfo = this.getCollectionInfo(collection);

// Save the indexes for this collection for later comparison
_indexData = collection.getIndexes().sort(function(a,b) {
indexData = collection.getIndexes().sort(function(a,b) {
if (a.name > b.name) return 1;
else return -1;
});

// Save the data for this collection for later comparison
_collectionData = collection.find().sort({"_id":1}).toArray();
collectionData = collection.find().sort({"_id":1}).toArray();

// Save the metadata for this collection for later comparison.
// NOTE: We do this last since the data and indexes affect this output
collectionStats = collection.stats();

// XXX: in 2.4 avgObjSize was a double, but in 2.6 it is an int
collectionStats['avgObjSize'] = Math.floor(collectionStats['avgObjSize']);

_initialized = true;
// Delete keys that appear just because we shard
delete collectionStats["primary"];
delete collectionStats["sharded"];

initialized = true;

return collection;
}

this.validateCollectionData = function (collection) {

if (!_initialized) {
if (!initialized) {
throw Error("validateCollectionWithAllData called, but data is not initialized");
}

// Get the metadata for this collection
var newCollectionInfo = this.getCollectionInfo(collection);
var newCollectionStats = collection.stats();

// XXX: in 2.4 avgObjSize was a double, but in 2.6 it is an int
newCollectionStats['avgObjSize'] = Math.floor(newCollectionStats['avgObjSize']);

// as of 2.7.1, we no longer use systemFlags
delete collectionStats.systemFlags;
delete newCollectionStats.systemFlags;

// as of 2.7.7, we no longer use paddingFactor and introduced paddingFactorNote
delete collectionStats.paddingFactor;
delete collectionStats.paddingFactorNote;
delete newCollectionStats.paddingFactor;
delete newCollectionStats.paddingFactorNote;

// Delete keys that appear just because we shard
delete newCollectionStats["primary"];
delete newCollectionStats["sharded"];

// as of 2.7.8, we added maxSize
// TODO: when 2.6 is no longer tested, remove following two lines
delete newCollectionStats["maxSize"];
delete collectionStats["maxSize"];

// Delete key added in 2.8-rc3
delete collectionStats["indexDetails"];
delete newCollectionStats["indexDetails"];

// Delete capped:false added in 2.8.0-rc5
if (newCollectionStats["capped"] == false) {
delete newCollectionStats["capped"];
}
if (collectionStats["capped"] == false) {
delete collectionStats["capped"];
}

assert.docEq(_collectionInfo, newCollectionInfo, "collection metadata not equal");
assert.docEq(collectionStats, newCollectionStats, "collection metadata not equal");

// Get the indexes for this collection
var newIndexData = collection.getIndexes().sort(function(a,b) {
if (a.name > b.name) return 1;
else return -1;
});
for (var i = 0; i < newIndexData.length; i++) {
assert.docEq(_indexData[i], newIndexData[i], "indexes not equal");
assert.docEq(indexData[i], newIndexData[i], "indexes not equal");
}

// Save the data for this collection for later comparison
var newCollectionData = collection.find().sort({"_id":1}).toArray();
for (var i = 0; i < newCollectionData.length; i++) {
assert.docEq(_collectionData[i], newCollectionData[i], "data not equal");
assert.docEq(collectionData[i], newCollectionData[i], "data not equal");
}
return true;
}
Expand Down
96 changes: 0 additions & 96 deletions jstests/multiVersion/mmapv1_overrides_default_storage_engine.js

This file was deleted.

2 changes: 1 addition & 1 deletion jstests/noPassthrough/dir_per_db_and_split.js
@@ -1,5 +1,5 @@

if (!jsTest.options().storageEngine || jsTest.options().storageEngine === "wiredTiger") {
if ( jsTest.options().storageEngine == "wiredTiger" ) {

var baseDir = "jstests_per_db_and_split_c_and_i";
port = allocatePorts( 1 )[ 0 ];
Expand Down
2 changes: 1 addition & 1 deletion jstests/noPassthrough/split_collections_and_indexes.js
@@ -1,5 +1,5 @@

if (!jsTest.options().storageEngine || jsTest.options().storageEngine === "wiredTiger") {
if ( jsTest.options().storageEngine == "wiredTiger" ) {

var baseDir = "jstests_split_c_and_i";
port = allocatePorts( 1 )[ 0 ];
Expand Down
5 changes: 4 additions & 1 deletion jstests/noPassthrough/wt_nojournal_fsync.js
Expand Up @@ -30,7 +30,10 @@ function writeDataAndRestart(doFsync) {
}

// This test can only be run if the storageEngine is wiredTiger
if (jsTest.options().storageEngine && jsTest.options().storageEngine !== "wiredTiger") {
// This check will have to change when we change the default storageEngine
if ( typeof(TestData) != "object" ||
!TestData.storageEngine ||
TestData.storageEngine != "wiredTiger" ) {
jsTestLog("Skipping test because storageEngine is not wiredTiger");
}
else {
Expand Down
4 changes: 3 additions & 1 deletion jstests/noPassthrough/wt_nojournal_repl.js
Expand Up @@ -26,7 +26,9 @@ var contains = function(logLines, func) {
}

// This test can only be run if the storageEngine is wiredTiger
if (jsTest.options().storageEngine && jsTest.options().storageEngine !== "wiredTiger") {
if ( typeof(TestData) != "object" ||
!TestData.storageEngine ||
TestData.storageEngine != "wiredTiger" ) {
jsTestLog("Skipping test because storageEngine is not wiredTiger");
}
else {
Expand Down
2 changes: 1 addition & 1 deletion jstests/noPassthroughWithMongod/index_check10.js
Expand Up @@ -135,7 +135,7 @@ function doIt( indexVersion ) {
for( var z = 0; z < 5; ++z ) {
var indexVersion = z % 2;
var storageEngine = jsTest.options().storageEngine;
if (storageEngine === 'mmapv1' || indexVersion !== 0) {
if (!storageEngine || storageEngine === 'mmapv1' || indexVersion !== 0) {
doIt(indexVersion);
}
}
2 changes: 1 addition & 1 deletion jstests/replsets/initSyncV1Index.js
Expand Up @@ -6,7 +6,7 @@
'use strict';

var storageEngine = jsTest.options().storageEngine;
if (storageEngine !== 'mmapv1') {
if (storageEngine && storageEngine !== 'mmapv1') {
return;
}

Expand Down
3 changes: 1 addition & 2 deletions jstests/sharding/stats.js
Expand Up @@ -132,8 +132,7 @@ collStatComp(coll_not_scaled, coll_scaled_1024, 1024, true);
assert.commandWorked(t.ensureIndex({a: 1}));
assert.eq(2, t.getIndexes().length);

var isWiredTiger = (!jsTest.options().storageEngine
|| jsTest.options().storageEngine === "wiredTiger");
var isWiredTiger = (jsTest.options().storageEngine == "wiredTiger");

var stats = assert.commandWorked(t.stats({indexDetails: true}));
var shardName;
Expand Down
4 changes: 3 additions & 1 deletion jstests/sharding/user_flags_sharded.js
@@ -1,7 +1,9 @@
// Test that when user flags are set on a collection,
// then collection is sharded, flags get carried over.

if (jsTest.options().storageEngine === "mmapv1") {
if ( typeof(TestData) != "object" ||
!TestData.storageEngine ||
TestData.storageEngine == "mmapv1" ) {

// the dbname and collection we'll be working with
var dbname = "testDB";
Expand Down

0 comments on commit 12d9dea

Please sign in to comment.