diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-11-19 14:01:59 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-11-19 14:19:12 -0500 |
commit | 047f82cdba8d515743fd451b773740276337d01f (patch) | |
tree | 1ff8a39b3455d762c4eecc15b428cea930220a2a | |
parent | 078ca783b7aa817a8f1a9629f495ccb414d189f3 (diff) | |
download | mongo-047f82cdba8d515743fd451b773740276337d01f.tar.gz |
SERVER-21384 Enable replica set suites for in-memory storage engines
31 files changed, 206 insertions, 27 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 91433ddc485..52e898502e5 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -4804,7 +4804,7 @@ buildvariants: gorootvars: GOROOT=/opt/go PATH="/opt/go/bin:$PATH" tooltags: "-tags 'ssl sasl'" rlp_environment: MONGOD_UNITTEST_RLP_LANGUAGE_TEST_BTROOT=/opt/basis - test_flags: --continueOnFailure --storageEngine=inMemory + test_flags: --continueOnFailure --storageEngine=inMemory --excludeWithAnyTags=requires_persistence compile_flags: --ssl MONGO_DISTMOD=rhel62 -j$(grep -c ^processor /proc/cpuinfo) --release CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ CPPPATH="/opt/basis/rlp/rlp/include /opt/basis/rlp/utilities/include" --use-basis-tech-rosette-linguistics-platform=on num_jobs_available: $(grep -c ^processor /proc/cpuinfo) has_packages: true @@ -4833,6 +4833,9 @@ buildvariants: # - name: concurrency # - name: concurrency_replication # - name: concurrency_sharded + - name: replicasets_WT + - name: replicasets_auth + - name: replicasets_legacy - name: slow1 # - name: slow2 - name: sharding_jscore_passthrough @@ -4847,7 +4850,7 @@ buildvariants: expansions: gitvars: LD_LIBRARY_PATH=/opt/openssl/lib64 #needed to workaround the old openSSL on rhel55 builders. gorootvars: GOROOT=/opt/go PATH="/opt/go/bin:$PATH" - test_flags: --continueOnFailure --storageEngine=ephemeralForTest + test_flags: --continueOnFailure --storageEngine=ephemeralForTest --excludeWithAnyTags=requires_persistence,requires_fsync,SERVER-21420 compile_flags: -j$(grep -c ^processor /proc/cpuinfo) --dbg=off --opt=on CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ num_jobs_available: $(grep -c ^processor /proc/cpuinfo) tasks: @@ -4872,6 +4875,9 @@ buildvariants: # - name: concurrency # - name: concurrency_replication # - name: concurrency_sharded + - name: replicasets_WT + - name: replicasets_auth + - name: replicasets_legacy - name: slow1 # - name: slow2 - name: sharding_jscore_passthrough diff --git a/jstests/replsets/apply_batch_only_goes_forward.js b/jstests/replsets/apply_batch_only_goes_forward.js index e1742b25d51..7786be9cc4f 100644 --- a/jstests/replsets/apply_batch_only_goes_forward.js +++ b/jstests/replsets/apply_batch_only_goes_forward.js @@ -8,6 +8,11 @@ * -- Ensure restarted primary (node0) comes up in recovering * -- Ensure node0 replicates a batch, and keeps the old minvalid * -- Success! + * + * This test requires persistence to test that a restarted primary will stay in the RECOVERING state + * when minvalid is set to the future. An ephemeral storage engine will not have a minvalid after + * restarting, so will initial sync in this scenario, invalidating the test. + * @tags: [requires_persistence] */ (function() { "use strict"; @@ -74,4 +79,4 @@ // Shut down the set and finish the test. replTest.stopSet(); -})();
\ No newline at end of file +})(); diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js index 1c254fbf7bd..939b1d90e22 100644 --- a/jstests/replsets/auth1.js +++ b/jstests/replsets/auth1.js @@ -1,4 +1,7 @@ // check replica set authentication +// +// This test requires users to persist across a restart. +// @tags: [requires_persistence] load("jstests/replsets/rslib.js"); diff --git a/jstests/replsets/auth2.js b/jstests/replsets/auth2.js index da62d4d0589..8899162d04e 100644 --- a/jstests/replsets/auth2.js +++ b/jstests/replsets/auth2.js @@ -1,3 +1,7 @@ +// Tests authentication with replica sets using key files. +// +// This test requires users to persist across a restart. +// @tags: [requires_persistence] var testInvalidAuthStates = function() { print("check that 0 is in recovering"); diff --git a/jstests/replsets/auth3.js b/jstests/replsets/auth3.js index 1cccd8a4d4b..d940c5e3e37 100644 --- a/jstests/replsets/auth3.js +++ b/jstests/replsets/auth3.js @@ -1,3 +1,13 @@ +// Tests that the creation of a user replicates to secondaries, and survives a restart of all +// data-bearing nodes. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] + (function () { "use strict"; var keyfile = "jstests/libs/key1"; @@ -18,7 +28,7 @@ master = rs.getMaster(); master.getDB("admin").auth("foo", "bar"); assert.writeOK(master.getDB("foo").bar.insert({ x: 1 })); - } + }; jsTest.log("authing"); for (var i=0; i<2; i++) { @@ -31,7 +41,7 @@ safeInsert(); authutil.asCluster(rs.nodes, keyfile, function() { rs.awaitReplication(); }); - jsTest.log("write stuff to 0&2") + jsTest.log("write stuff to 0&2"); rs.stop(1); master = rs.getMaster(); @@ -40,7 +50,7 @@ jsTest.log("last op: " + tojson(master.getDB("local").oplog.rs.find().sort({$natural:-1}).limit(1).next())); - jsTest.log("write stuff to 1&2") + jsTest.log("write stuff to 1&2"); rs.stop(0); rs.restart(1); diff --git a/jstests/replsets/batch_write_command_wc.js b/jstests/replsets/batch_write_command_wc.js index 997648abc96..c71fa18bb45 100644 --- a/jstests/replsets/batch_write_command_wc.js +++ b/jstests/replsets/batch_write_command_wc.js @@ -1,6 +1,8 @@ -// // Tests write-concern-related batch write protocol functionality // +// This test asserts that a journaled write to a mongod running with --nojournal should be rejected, +// so cannot be run on the ephemeralForTest storage engine, as it accepts all journaled writes. +// @tags: [SERVER-21420] var request; var result; diff --git a/jstests/replsets/bulk_api_wc.js b/jstests/replsets/bulk_api_wc.js index 86348943644..a92b536dda1 100644 --- a/jstests/replsets/bulk_api_wc.js +++ b/jstests/replsets/bulk_api_wc.js @@ -1,6 +1,8 @@ -// // Tests write-concern-related bulk api functionality // +// This test asserts that a journaled write to a mongod running with --nojournal should be rejected, +// so cannot be run on the ephemeralForTest storage engine, as it accepts all journaled writes. +// @tags: [SERVER-21420] jsTest.log("Starting bulk api write concern tests..."); diff --git a/jstests/replsets/initial_sync3.js b/jstests/replsets/initial_sync3.js index dc0455dd108..b7446813004 100644 --- a/jstests/replsets/initial_sync3.js +++ b/jstests/replsets/initial_sync3.js @@ -1,6 +1,13 @@ /* test initial sync options * * Make sure member can't sync from a member with a different buildIndexes setting. + * + * If all nodes in a replica set are using an ephemeral storage engine, the set will not be able to + * survive a scenario where all index-building members are down simultaneously. In such a + * scenario, none of the members will have any data, and upon restart will each look for a member to + * inital sync from. They cannot sync from a member which does not build indexes, so no primary will + * be elected. This test induces such a scenario, so cannot be run on ephemeral storage engines. + * @tags: [requires_persistence] */ diff --git a/jstests/replsets/initiate_without_replset_name_at_startup.js b/jstests/replsets/initiate_without_replset_name_at_startup.js index c7e7c7f5e28..8db76862088 100644 --- a/jstests/replsets/initiate_without_replset_name_at_startup.js +++ b/jstests/replsets/initiate_without_replset_name_at_startup.js @@ -5,6 +5,10 @@ * --replSet to the startup configuration directives, the node can immediately transition into * PRIMARY rather than waiting in STARTUP for the operator to run replSetInitiate. This should * only be allowed for single-node replica set configurations. + * + * This test cannot be run on ephemeral storage engines, since their replica set config document + * will not persist across a restart and they will not transition to PRIMARY as described above. + * @tags: [requires_persistence] */ (function () { "use strict"; diff --git a/jstests/replsets/maxSyncSourceLagSecs.js b/jstests/replsets/maxSyncSourceLagSecs.js index 1ae9f470629..087db2edaab 100644 --- a/jstests/replsets/maxSyncSourceLagSecs.js +++ b/jstests/replsets/maxSyncSourceLagSecs.js @@ -1,4 +1,7 @@ // Test that setting maxSyncSourceLagSecs causes the set to change sync target +// +// This test requires the fsync command to ensure members experience a delay. +// @tags: [requires_fsync] (function() { "use strict"; var name = "maxSyncSourceLagSecs"; diff --git a/jstests/replsets/oplog_truncated_on_recovery.js b/jstests/replsets/oplog_truncated_on_recovery.js index 8b0bc22430a..8142b8df7ee 100644 --- a/jstests/replsets/oplog_truncated_on_recovery.js +++ b/jstests/replsets/oplog_truncated_on_recovery.js @@ -2,10 +2,20 @@ * This test will ensure that a failed a batch apply will remove the any oplog * entries from that batch. * - * To do this we: -- Create single node replica set -- Set minvalid manually on - * primary way ahead (5 minutes) -- Write some oplog entries newer than - * minvalid.start -- Ensure restarted primary comes up in recovering and - * truncates the oplog -- Success! + * To do this we: + * -- Create single node replica set + * -- Set minvalid manually on primary way ahead (5 minutes) + * -- Write some oplog entries newer than minvalid.start + * -- Ensure restarted primary comes up in recovering and truncates the oplog + * -- Success! + * + * This test requires persistence for two reasons: + * 1. To test that a restarted primary will stay in the RECOVERING state when minvalid is set to + * the future. An ephemeral storage engine will not have a minvalid after a restart, so the node + * will start an initial sync in this scenario, invalidating the test. + * 2. It uses a single node replica set, which cannot be restarted in any meaningful way with an + * ephemeral storage engine. + * @tags: [requires_persistence] */ (function() { "use strict"; @@ -118,4 +128,4 @@ // Shut down the set and finish the test. replTest.stopSet(); -})();
\ No newline at end of file +})(); diff --git a/jstests/replsets/replset1.js b/jstests/replsets/replset1.js index d1b402f445f..78eda706025 100644 --- a/jstests/replsets/replset1.js +++ b/jstests/replsets/replset1.js @@ -104,6 +104,7 @@ var doTest = function( signal ) { // And that both slave nodes have all the updates new_master = replTest.getMaster(); assert.eq( 1000 , new_master.getDB( "bar" ).runCommand( { count:"bar"} ).n , "assumption 2"); + replTest.awaitSecondaryNodes(); replTest.awaitReplication(); var slaves = replTest.liveNodes.slaves; diff --git a/jstests/replsets/replsetrestart1.js b/jstests/replsets/replsetrestart1.js index cb32c178e11..0224d0f47c7 100644 --- a/jstests/replsets/replsetrestart1.js +++ b/jstests/replsets/replsetrestart1.js @@ -1,3 +1,12 @@ +// Tests that we can restart a replica set completely. Also tests that the config is saved properly +// between restarts. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any replica set configuration document after a restart, +// so cannot elect a primary. This test induces such a scenario, so cannot be run on ephemeral +// storage engines. +// @tags: [requires_persistence] (function() { var compare_configs = function(c1, c2) { @@ -11,9 +20,6 @@ } }; - // Make sure that we can restart a replica set completely - // Also, ensure config is saved properly between restarts. - // Create a new replica set test. Specify set name and the number of nodes you want. var replTest = new ReplSetTest( {name: 'testSet', nodes: 3} ); @@ -45,7 +51,7 @@ replTest.stop( s2Id ); replTest.waitForState(s1, replTest.DOWN); replTest.waitForState(s2, replTest.DOWN); - + replTest.stop( mId ); // Now let's restart these nodes diff --git a/jstests/replsets/restore_term.js b/jstests/replsets/restore_term.js index 35c6d8965e4..00fa68ed0d0 100644 --- a/jstests/replsets/restore_term.js +++ b/jstests/replsets/restore_term.js @@ -1,5 +1,14 @@ load("jstests/replsets/rslib.js"); +// Tests that the replica set's term increases once per election, and persists across a restart of +// the entire set. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any replica set configuration document after a restart, +// so cannot elect a primary. This test induces such a scenario, so cannot be run on ephemeral +// storage engines. +// @tags: [requires_persistence] (function() { "use strict"; diff --git a/jstests/replsets/resync.js b/jstests/replsets/resync.js index 49eb570a318..550057f4541 100755 --- a/jstests/replsets/resync.js +++ b/jstests/replsets/resync.js @@ -1,6 +1,11 @@ // test that the resync command works with replica sets and that one does not need to manually // force a replica set resync by deleting all datafiles // Also tests that you can do this from a node that is "too stale" +// +// This test requires persistence in order for a restarted node with a stale oplog to stay in the +// RECOVERING state. A restarted node with an ephemeral storage engine will not have an oplog upon +// restart, so will immediately resync. +// @tags: [requires_persistence] (function() { "use strict"; var replTest = new ReplSetTest({name: 'resync', nodes: 3, oplogSize: 1}); diff --git a/jstests/replsets/rollback5.js b/jstests/replsets/rollback5.js index ce28b6a4474..7159edead5c 100644 --- a/jstests/replsets/rollback5.js +++ b/jstests/replsets/rollback5.js @@ -1,6 +1,13 @@ // test that a rollback directory is created during a replica set rollback // this also tests that updates are recorded in the rollback file // (this test does no delete rollbacks) +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] var replTest = new ReplSetTest({ name: 'rollback5', nodes: 3 }); var nodes = replTest.nodeList(); diff --git a/jstests/replsets/rollback_auth.js b/jstests/replsets/rollback_auth.js index a39781f9369..589f755aaed 100644 --- a/jstests/replsets/rollback_auth.js +++ b/jstests/replsets/rollback_auth.js @@ -2,6 +2,13 @@ // This test creates a user and then does two different sets of updates to that user's privileges // using the replSetTest command to trigger a rollback and verify that at the end the access control // data is rolled back correctly and the user only has access to the expected collections. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] (function () { "use strict"; diff --git a/jstests/replsets/rollback_cmd_unrollbackable.js b/jstests/replsets/rollback_cmd_unrollbackable.js index da8422c7f28..8cfe12e6523 100644 --- a/jstests/replsets/rollback_cmd_unrollbackable.js +++ b/jstests/replsets/rollback_cmd_unrollbackable.js @@ -1,4 +1,11 @@ // test that a rollback of a non-rollbackable command causes a message to be logged +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // set up a set and grab things for later var name = "rollback_cmd_unrollbackable"; diff --git a/jstests/replsets/rollback_collMod_PowerOf2Sizes.js b/jstests/replsets/rollback_collMod_PowerOf2Sizes.js index 376ef081823..2032f9a584b 100644 --- a/jstests/replsets/rollback_collMod_PowerOf2Sizes.js +++ b/jstests/replsets/rollback_collMod_PowerOf2Sizes.js @@ -1,4 +1,11 @@ // Test that a rollback of collModding usePowerOf2Sizes and validator can be rolled back. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] (function() { "use strict"; diff --git a/jstests/replsets/rollback_collMod_fatal.js b/jstests/replsets/rollback_collMod_fatal.js index a5c16a14d47..62cb22ac20a 100644 --- a/jstests/replsets/rollback_collMod_fatal.js +++ b/jstests/replsets/rollback_collMod_fatal.js @@ -1,4 +1,11 @@ // test that a rollback of collMod altering TTL will cause the node to go into a FATAL state +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // set up a set and grab things for later var name = "rollback_collMod_fatal"; diff --git a/jstests/replsets/rollback_different_h.js b/jstests/replsets/rollback_different_h.js index d3fc64f3f1a..a6350a325da 100644 --- a/jstests/replsets/rollback_different_h.js +++ b/jstests/replsets/rollback_different_h.js @@ -1,4 +1,11 @@ // test that a rollback of an entry that matches the ts but not h causes no problems +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // function to check the logs for an entry doesEntryMatch = function(array, regex) { diff --git a/jstests/replsets/rollback_dropdb.js b/jstests/replsets/rollback_dropdb.js index eddab44e87c..368dbb6ee95 100644 --- a/jstests/replsets/rollback_dropdb.js +++ b/jstests/replsets/rollback_dropdb.js @@ -1,4 +1,11 @@ // test that a rollback of dropdatabase will cause the node to go into a FATAL state +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // set up a set and grab things for later var name = "rollback_dropdb"; diff --git a/jstests/replsets/rollback_empty_ns.js b/jstests/replsets/rollback_empty_ns.js index e5680bda02b..a5c6a92c1be 100644 --- a/jstests/replsets/rollback_empty_ns.js +++ b/jstests/replsets/rollback_empty_ns.js @@ -1,4 +1,11 @@ // test that a rollback of an op with empty ns causes a message to be logged +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // function to check the logs for an entry doesEntryMatch = function(array, regex) { diff --git a/jstests/replsets/rollback_empty_o.js b/jstests/replsets/rollback_empty_o.js index 7c9969b0143..81a84db6eac 100644 --- a/jstests/replsets/rollback_empty_o.js +++ b/jstests/replsets/rollback_empty_o.js @@ -1,4 +1,11 @@ // test that a rollback of an op with empty o causes a message to be logged +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // function to check the logs for an entry doesEntryMatch = function(array, regex) { diff --git a/jstests/replsets/rollback_empty_o2.js b/jstests/replsets/rollback_empty_o2.js index 7ecbd78c8bd..7e4a22be06d 100644 --- a/jstests/replsets/rollback_empty_o2.js +++ b/jstests/replsets/rollback_empty_o2.js @@ -1,4 +1,11 @@ // test that a rollback of an update with empty o2 causes a message to be logged +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // function to check the logs for an entry doesEntryMatch = function(array, regex) { diff --git a/jstests/replsets/rollback_fake_cmd.js b/jstests/replsets/rollback_fake_cmd.js index be1b8e033a8..03ae1345790 100644 --- a/jstests/replsets/rollback_fake_cmd.js +++ b/jstests/replsets/rollback_fake_cmd.js @@ -1,4 +1,11 @@ // test that a rollback of a nonexistent command causes a message to be logged +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] // function to check the logs for an entry doesEntryMatch = function(array, regex) { diff --git a/jstests/replsets/rollback_index.js b/jstests/replsets/rollback_index.js index c5122a2bcbc..17a230bbd5b 100644 --- a/jstests/replsets/rollback_index.js +++ b/jstests/replsets/rollback_index.js @@ -1,4 +1,12 @@ // test that a rollback of an index creation op caused the index to be dropped. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] + load("jstests/replsets/rslib.js"); // function to check the logs for an entry diff --git a/jstests/replsets/rollback_too_new.js b/jstests/replsets/rollback_too_new.js index c8eeaa42370..c3ff41368ca 100644 --- a/jstests/replsets/rollback_too_new.js +++ b/jstests/replsets/rollback_too_new.js @@ -1,4 +1,11 @@ // test that a rollback of an op more than 1800 secs newer than the new master causes fatal shutdown +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] (function() { "use strict"; diff --git a/jstests/replsets/stepdown.js b/jstests/replsets/stepdown.js index 96d0aaa7383..77dd76462df 100644 --- a/jstests/replsets/stepdown.js +++ b/jstests/replsets/stepdown.js @@ -1,9 +1,12 @@ -/* check that on a loss of primary, another node doesn't assume primary if it is stale - we force a stepDown to test this - we use lock+fsync to force secondary to be stale -*/ - -load("jstests/replsets/rslib.js") +/** + * Check that on a loss of primary, another node doesn't assume primary if it is stale. We force a + * stepDown to test this. + * + * This test requires the fsync command to force a secondary to be stale. + * @tags: [requires_fsync] + */ + +load("jstests/replsets/rslib.js"); // utility to check if an error was due to connection failure. var errorWasDueToConnectionFailure = function(error) { diff --git a/jstests/replsets/stepdown3.js b/jstests/replsets/stepdown3.js index 2995ef62d99..b4464f12c22 100644 --- a/jstests/replsets/stepdown3.js +++ b/jstests/replsets/stepdown3.js @@ -1,4 +1,7 @@ -// Test that GLE asserts when the primary steps down while we're waiting for w: +// Test that GLE asserts when the primary steps down while we're waiting for a replicated write. +// +// This test requires the fsync command to force a secondary to be stale. +// @tags: [requires_fsync] var replTest = new ReplSetTest({ name: 'testSet', nodes: 2 }); var nodes = replTest.startSet(); diff --git a/jstests/replsets/toostale.js b/jstests/replsets/toostale.js index 232a98baff8..9225921daf2 100644 --- a/jstests/replsets/toostale.js +++ b/jstests/replsets/toostale.js @@ -1,10 +1,14 @@ - -// this tests that: +// This tests that: // * stale members get into state 3 (recovering) // * they stay in state 3 after restarting // * they can recover and go into state 2 if someone less up-to-date becomes primary +// +// This test requires persistence in order for a restarted node with a stale oplog to stay in the +// RECOVERING state. A restarted node with an ephemeral storage engine will not have an oplog upon +// restart, so will immediately resync. +// @tags: [requires_persistence] -/* +/** * 1: initial insert * 2: initial sync * 3: blind s2 |