diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-01-13 17:30:00 -0500 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-01-15 16:18:05 -0500 |
commit | 920d38ceb07bff0ec18e2f173d942c3b743dea4b (patch) | |
tree | 9643000f53c9fdd8769404c5a43df3b3beb1274c | |
parent | 2d8008289b9d075c56841dc08830bb7cff28aeaf (diff) | |
download | mongo-920d38ceb07bff0ec18e2f173d942c3b743dea4b.tar.gz |
SERVER-22081 blacklisting tests from the continuous config stepdown suite that do direct writes (with no retries) against config/admin databases
21 files changed, 41 insertions, 38 deletions
diff --git a/buildscripts/resmokeconfig/suites/sharding_continuous_config_stepdown.yml b/buildscripts/resmokeconfig/suites/sharding_continuous_config_stepdown.yml index 2046d837a33..01f4d3ff7ac 100644 --- a/buildscripts/resmokeconfig/suites/sharding_continuous_config_stepdown.yml +++ b/buildscripts/resmokeconfig/suites/sharding_continuous_config_stepdown.yml @@ -64,6 +64,16 @@ selector: - jstests/sharding/top_chunk_autosplit.js - jstests/sharding/count_config_servers.js - jstests/sharding/conf_server_write_concern.js + # No retries on direct writes to the config/admin databases on the config servers + - jstests/sharding/listDatabases.js + - jstests/sharding/bulk_insert.js + - jstests/sharding/printShardingStatus.js + # Balancer writes (direct write to config database with no retries) + - jstests/sharding/remove2.js + - jstests/sharding/auto2.js + - jstests/sharding/features3.js + - jstests/sharding/in_memory_sort_limit.js + - jstests/sharding/parallel.js # Calls the config server primary directly (not through mongos) - jstests/sharding/moveprimary_ignore_sharded.js - jstests/sharding/min_optime_recovery.js @@ -80,6 +90,9 @@ selector: - jstests/sharding/startup_with_all_configs_down.js - jstests/sharding/replset_config/lagged_config_secondary.js - jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js + - jstests/sharding/sharding_state_after_stepdown.js + - jstests/sharding/rs_stepdown_and_pooling.js + - jstests/sharding/mongos_no_replica_set_refresh.js # Nothing is affected by config server step down - jstests/sharding/replset_config/basic_sharding_params.js # ShardingTest is never used, so continuous step down thread never starts diff --git a/jstests/sharding/authCommands.js b/jstests/sharding/authCommands.js index 2198547be08..f502f90567a 100644 --- a/jstests/sharding/authCommands.js +++ b/jstests/sharding/authCommands.js @@ -51,8 +51,7 @@ st.adminCommand( { enablesharding : "test" } ); st.ensurePrimaryShard('test', 'test-rs0'); st.adminCommand( { shardcollection : "test.foo" , key : { i : 1, j : 1 } } ); -// Stop the balancer, so no moveChunks will interfere with the splits we're testing -st.stopBalancer() +// Balancer is stopped by default, so no moveChunks will interfere with the splits we're testing var str = 'a'; while ( str.length < 8000 ) { diff --git a/jstests/sharding/authConnectionHook.js b/jstests/sharding/authConnectionHook.js index aa8d4d9d9d9..2456cfdbb2c 100644 --- a/jstests/sharding/authConnectionHook.js +++ b/jstests/sharding/authConnectionHook.js @@ -14,7 +14,6 @@ adminDB.auth('admin', 'password'); adminDB.runCommand({enableSharding : "test"}); st.ensurePrimaryShard('test', 'shard0001'); adminDB.runCommand({shardCollection : "test.foo", key : {x : 1}}); -st.stopBalancer(); for (var i = 0; i < 100; i++) { db.foo.insert({x:i}); diff --git a/jstests/sharding/autosplit_heuristics.js b/jstests/sharding/autosplit_heuristics.js index 6618dd329a5..cb5e1260cb9 100644 --- a/jstests/sharding/autosplit_heuristics.js +++ b/jstests/sharding/autosplit_heuristics.js @@ -7,8 +7,8 @@ var st = new ShardingTest({ shards : 1, mongos : 1, other : { mongosOptions : { chunkSize : 1, verbose : 2 }}}); -// The balancer may interfere unpredictably with the chunk moves/splits depending on timing. -st.stopBalancer(); +// The balancer is by default stopped, thus it will NOT interfere unpredictably with the chunk +// moves/splits depending on the timing. // Test is not valid for debug build, heuristics get all mangled by debug reload behavior var isDebugBuild = st.s0.getDB( "admin" ).serverBuildInfo().debug; diff --git a/jstests/sharding/cleanup_orphaned_cmd_prereload.js b/jstests/sharding/cleanup_orphaned_cmd_prereload.js index 483c3d6de6b..3dfc68ca9a3 100644 --- a/jstests/sharding/cleanup_orphaned_cmd_prereload.js +++ b/jstests/sharding/cleanup_orphaned_cmd_prereload.js @@ -3,7 +3,6 @@ // var st = new ShardingTest({ shards: 2 }); -st.stopBalancer(); var mongos = st.s0; var admin = mongos.getDB( "admin" ); diff --git a/jstests/sharding/coll_epoch_test0.js b/jstests/sharding/coll_epoch_test0.js index 73614c095f5..35d01ff786d 100644 --- a/jstests/sharding/coll_epoch_test0.js +++ b/jstests/sharding/coll_epoch_test0.js @@ -1,8 +1,7 @@ // Tests whether a split and a migrate in a sharded cluster preserve the epoch var st = new ShardingTest( { shards : 2, mongos : 1 } ) -// Stop balancer, it'll interfere -st.stopBalancer() +// Balancer is by default stopped, thus it will not interfere var config = st.s.getDB( "config" ) var admin = st.s.getDB( "admin" ) diff --git a/jstests/sharding/coll_epoch_test1.js b/jstests/sharding/coll_epoch_test1.js index 6a1d1dd3b21..472f232ba7f 100644 --- a/jstests/sharding/coll_epoch_test1.js +++ b/jstests/sharding/coll_epoch_test1.js @@ -1,8 +1,7 @@ // Tests various cases of dropping and recreating collections in the same namespace with multiple mongoses var st = new ShardingTest({ shards : 3, mongos : 3, verbose : 1 }) -// Stop balancer, it'll interfere -st.stopBalancer() +// Balancer is by default stopped, thus it will not interfere // Use separate mongoses for admin, inserting data, and validating results, so no // single-mongos tricks will work diff --git a/jstests/sharding/coll_epoch_test2.js b/jstests/sharding/coll_epoch_test2.js index 03488168d9e..c76cf51266f 100644 --- a/jstests/sharding/coll_epoch_test2.js +++ b/jstests/sharding/coll_epoch_test2.js @@ -5,8 +5,7 @@ // var st = new ShardingTest({ shards : 2, mongos : 5, verbose : 1 }) -// Stop balancer, it'll interfere -st.stopBalancer() +// Balancer is by default stopped, thus it will not interfere // Use separate mongos for reading, updating, inserting, removing data var readMongos = st.s1 diff --git a/jstests/sharding/covered_shard_key_indexes.js b/jstests/sharding/covered_shard_key_indexes.js index 414cd8dcc96..e5cd1ce93b0 100644 --- a/jstests/sharding/covered_shard_key_indexes.js +++ b/jstests/sharding/covered_shard_key_indexes.js @@ -7,7 +7,6 @@ load("jstests/libs/analyze_plan.js"); var st = new ShardingTest({ shards : 1 }); -st.stopBalancer(); var mongos = st.s0; var admin = mongos.getDB( "admin" ); diff --git a/jstests/sharding/cursor_cleanup.js b/jstests/sharding/cursor_cleanup.js index 9e345a94223..e0971db5e32 100644 --- a/jstests/sharding/cursor_cleanup.js +++ b/jstests/sharding/cursor_cleanup.js @@ -3,7 +3,6 @@ // var st = new ShardingTest({ shards : 2, mongos : 1 }); -st.stopBalancer(); var mongos = st.s0; var admin = mongos.getDB( "admin" ); diff --git a/jstests/sharding/delete_during_migrate.js b/jstests/sharding/delete_during_migrate.js index 81daf3c3e52..cabed50b960 100644 --- a/jstests/sharding/delete_during_migrate.js +++ b/jstests/sharding/delete_during_migrate.js @@ -4,9 +4,7 @@ // start up a new sharded cluster var st = new ShardingTest({ shards : 2, mongos : 1 }); - -// stop balancer since we want manual control for this -st.stopBalancer(); +// Balancer is by default stopped, thus we have manual control var dbname = "testDB"; var coll = "foo"; diff --git a/jstests/sharding/exact_shard_key_target.js b/jstests/sharding/exact_shard_key_target.js index bc416166866..e21e6be95b1 100644 --- a/jstests/sharding/exact_shard_key_target.js +++ b/jstests/sharding/exact_shard_key_target.js @@ -5,7 +5,6 @@ // var st = new ShardingTest({ shards : 2, verbose : 4 }); -st.stopBalancer(); var mongos = st.s0; var coll = mongos.getCollection("foo.bar"); @@ -71,4 +70,4 @@ assert.eq(1, st.shard0.getCollection(coll.toString()).count() + st.shard1.getCollection(coll.toString()).count() ); jsTest.log("DONE!"); -st.stop();
\ No newline at end of file +st.stop(); diff --git a/jstests/sharding/listDatabases.js b/jstests/sharding/listDatabases.js index 998791acbd0..2d26bb4e2d3 100644 --- a/jstests/sharding/listDatabases.js +++ b/jstests/sharding/listDatabases.js @@ -39,7 +39,7 @@ var localSection = getDBSection(dbArray, 'local'); assert(!localSection); // add doc in admin db on the config server. -mongos.getDB('admin').test.insert({ _id: 1 }); +assert.writeOK(mongos.getDB('admin').test.insert({ _id: 1 })); res = mongos.adminCommand("listDatabases"); dbArray = res.databases; dbInConfigEntryCheck(getDBSection(dbArray, "config")); diff --git a/jstests/sharding/mapReduce_inSharded.js b/jstests/sharding/mapReduce_inSharded.js index 4fffeed9e1e..6fedd51b919 100644 --- a/jstests/sharding/mapReduce_inSharded.js +++ b/jstests/sharding/mapReduce_inSharded.js @@ -6,8 +6,10 @@ var verifyOutput = function(out) { assert.eq(out.counts.output, 512, "output count is wrong"); } -var st = new ShardingTest({ shards : 2, verbose : 1, mongos : 1, other : { chunkSize: 1 } }); -st.startBalancer(); +var st = new ShardingTest({ shards : 2, + verbose : 1, + mongos : 1, + other : { chunkSize: 1, enableBalancer: true }}); st.adminCommand( { enablesharding : "mrShard" } ) st.ensurePrimaryShard('mrShard', 'shard0001'); diff --git a/jstests/sharding/mapReduce_inSharded_outSharded.js b/jstests/sharding/mapReduce_inSharded_outSharded.js index f93acae31a3..39fde3234e0 100644 --- a/jstests/sharding/mapReduce_inSharded_outSharded.js +++ b/jstests/sharding/mapReduce_inSharded_outSharded.js @@ -6,8 +6,10 @@ var verifyOutput = function(out) { assert.eq(out.counts.output, 512, "output count is wrong"); } -var st = new ShardingTest({ shards : 2, verbose : 1, mongos : 1, other : { chunkSize: 1 } }); -st.startBalancer(); +var st = new ShardingTest({ shards : 2, + verbose : 1, + mongos : 1, + other : { chunkSize: 1, enableBalancer: true }}); st.adminCommand( { enablesharding : "mrShard" } ) st.ensurePrimaryShard('mrShard', 'shard0001'); diff --git a/jstests/sharding/mapReduce_nonSharded.js b/jstests/sharding/mapReduce_nonSharded.js index acf9e20319a..29b47dcbbbd 100644 --- a/jstests/sharding/mapReduce_nonSharded.js +++ b/jstests/sharding/mapReduce_nonSharded.js @@ -6,8 +6,10 @@ var verifyOutput = function(out) { assert.eq(out.counts.output, 512, "output count is wrong"); } -var st = new ShardingTest({ shards : 2, verbose : 1, mongos : 1, other : { chunkSize: 1 } }); -st.startBalancer(); +var st = new ShardingTest({ shards : 2, + verbose : 1, + mongos : 1, + other : { chunkSize: 1, enableBalancer: true }}); st.adminCommand( { enablesharding : "mrShard" } ) st.ensurePrimaryShard('mrShard', 'shard0001'); diff --git a/jstests/sharding/mapReduce_outSharded.js b/jstests/sharding/mapReduce_outSharded.js index 331e8a52a4d..62ad05eb7b7 100644 --- a/jstests/sharding/mapReduce_outSharded.js +++ b/jstests/sharding/mapReduce_outSharded.js @@ -6,8 +6,10 @@ var verifyOutput = function(out) { assert.eq(out.counts.output, 512, "output count is wrong"); } -var st = new ShardingTest({ shards : 2, verbose : 1, mongos : 1, other : { chunkSize: 1 } }); -st.startBalancer(); +var st = new ShardingTest({ shards : 2, + verbose : 1, + mongos : 1, + other : { chunkSize: 1, enableBalancer: true }}); st.adminCommand( { enablesharding : "mrShard" } ) st.ensurePrimaryShard('mrShard', 'shard0001'); diff --git a/jstests/sharding/mongos_no_detect_sharding.js b/jstests/sharding/mongos_no_detect_sharding.js index a0423381fc9..5e4ab46a371 100644 --- a/jstests/sharding/mongos_no_detect_sharding.js +++ b/jstests/sharding/mongos_no_detect_sharding.js @@ -8,12 +8,8 @@ var st = new ShardingTest({ name: "mongos_no_detect_sharding", var mongos = st.s var config = mongos.getDB("config") -config.settings.update({ _id : "balancer" }, { $set : { stopped : true } }, true ) - - print( "Creating unsharded connection..." ) - var mongos2 = st._mongos[1] var coll = mongos2.getCollection( "test.foo" ) diff --git a/jstests/sharding/mongos_no_replica_set_refresh.js b/jstests/sharding/mongos_no_replica_set_refresh.js index 77d8c5e627e..d5e5d6bf2e0 100644 --- a/jstests/sharding/mongos_no_replica_set_refresh.js +++ b/jstests/sharding/mongos_no_replica_set_refresh.js @@ -29,8 +29,6 @@ assert.commandWorked( var mongos = st.s; var config = mongos.getDB("config"); -config.settings.update({ _id : "balancer" }, { $set : { stopped : true } }, true ); - printjson( mongos.getCollection("foo.bar").findOne() ); var primary = rsObj.getPrimary(); diff --git a/jstests/sharding/multi_mongos2.js b/jstests/sharding/multi_mongos2.js index 92c9993ecdd..d6dbe8cb943 100644 --- a/jstests/sharding/multi_mongos2.js +++ b/jstests/sharding/multi_mongos2.js @@ -16,8 +16,7 @@ s1.getDB('test').existing.insert({_id:1}) assert.eq(1, s1.getDB('test').existing.count({_id:1})); assert.eq(1, s2.getDB('test').existing.count({_id:1})); -// We need to turn off the balancer before doing manual moves, otherwise they can interfere -s1.stopBalancer() +// Balancer is by default stopped, thus it will not interfere with manual chunk moves. s2.adminCommand( { shardcollection : "test.existing" , key : { _id : 1 } } ); assert.commandWorked(s2.adminCommand({ split: "test.existing", middle: { _id: 5 }})); diff --git a/jstests/sharding/recovering_slaveok.js b/jstests/sharding/recovering_slaveok.js index 656bcdb44dc..baedcd59ba2 100644 --- a/jstests/sharding/recovering_slaveok.js +++ b/jstests/sharding/recovering_slaveok.js @@ -24,8 +24,8 @@ var collSOk = mongosSOK.getCollection( "" + coll ); var rsA = shardTest._rs[0].test; var rsB = shardTest._rs[1].test; -rsA.getPrimary().getDB( "test_a" ).dummy.insert({ x : 1 }); -rsB.getPrimary().getDB( "test_b" ).dummy.insert({ x : 1 }); +assert.writeOK(rsA.getPrimary().getDB( "test_a" ).dummy.insert({ x : 1 })); +assert.writeOK(rsB.getPrimary().getDB( "test_b" ).dummy.insert({ x : 1 })); rsA.awaitReplication(); rsB.awaitReplication(); |