From a3ff4e388f08c8ba9df6cdff52fbd632535a5a7e Mon Sep 17 00:00:00 2001 From: Dianna Hohensee Date: Tue, 10 Jan 2017 09:32:08 -0500 Subject: [PATCH] SERVER-24163 remove waitForCSRSSecondaries:false from multiversion tests, which was only needed for 3.2 compatibility --- .../multiVersion/2_test_launching_cluster.js | 8 ++----- .../balancer_multiVersion_detect.js | 5 +---- .../multiVersion/libs/dumprestore_helpers.js | 8 ++----- ...migration_between_mixed_version_mongods.js | 4 +--- jstests/multiVersion/upgrade_cluster.js | 4 +--- src/mongo/shell/shardingtest.js | 21 +++++++------------ 6 files changed, 14 insertions(+), 36 deletions(-) diff --git a/jstests/multiVersion/2_test_launching_cluster.js b/jstests/multiVersion/2_test_launching_cluster.js index 1d126e79c85..02744282171 100644 --- a/jstests/multiVersion/2_test_launching_cluster.js +++ b/jstests/multiVersion/2_test_launching_cluster.js @@ -20,9 +20,7 @@ load('./jstests/multiVersion/libs/verify_versions.js'); mongosOptions: {binVersion: versionsToCheckMongos}, configOptions: {binVersion: versionsToCheck}, shardOptions: {binVersion: versionsToCheck}, - enableBalancer: true, - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false, + enableBalancer: true } }); @@ -64,9 +62,7 @@ load('./jstests/multiVersion/libs/verify_versions.js'); mongosOptions: {binVersion: versionsToCheckMongos}, configOptions: {binVersion: versionsToCheck}, rsOptions: {binVersion: versionsToCheck, protocolVersion: 0}, - enableBalancer: true, - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false, + enableBalancer: true } }); diff --git a/jstests/multiVersion/balancer_multiVersion_detect.js b/jstests/multiVersion/balancer_multiVersion_detect.js index 8cd2a7c1046..062eb6abed7 100644 --- a/jstests/multiVersion/balancer_multiVersion_detect.js +++ b/jstests/multiVersion/balancer_multiVersion_detect.js @@ -5,13 +5,10 @@ jsTest.log("Starting cluster..."); var options = { - mongosOptions: {verbose: 1, useLogFiles: true}, configOptions: {}, shardOptions: {binVersion: ["latest", "last-stable"]}, - enableBalancer: true, - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false + enableBalancer: true }; var st = new ShardingTest({shards: 3, mongos: 1, other: options}); diff --git a/jstests/multiVersion/libs/dumprestore_helpers.js b/jstests/multiVersion/libs/dumprestore_helpers.js index 97fbc30bfd6..5502a10bbb9 100644 --- a/jstests/multiVersion/libs/dumprestore_helpers.js +++ b/jstests/multiVersion/libs/dumprestore_helpers.js @@ -59,9 +59,7 @@ function multiVersionDumpRestoreTest(configObj) { binVersion: configObj.serverSourceVersion, storageEngine: configObj.storageEngine }], - config: [{binVersion: configObj.serverSourceVersion}], - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false + config: [{binVersion: configObj.serverSourceVersion}] }; var shardingTest = new ShardingTest(shardingTestConfig); var serverSource = shardingTest.s; @@ -125,9 +123,7 @@ function multiVersionDumpRestoreTest(configObj) { mongos: [{binVersion: configObj.serverDestVersion}], shards: [{binVersion: configObj.serverDestVersion, storageEngine: configObj.storageEngine}], - config: [{binVersion: configObj.serverDestVersion}], - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false + config: [{binVersion: configObj.serverDestVersion}] }; var shardingTest = new ShardingTest(shardingTestConfig); serverDest = shardingTest.s; diff --git a/jstests/multiVersion/migration_between_mixed_version_mongods.js b/jstests/multiVersion/migration_between_mixed_version_mongods.js index 0d2728eb58e..5541a84e5ef 100644 --- a/jstests/multiVersion/migration_between_mixed_version_mongods.js +++ b/jstests/multiVersion/migration_between_mixed_version_mongods.js @@ -17,9 +17,7 @@ load("./jstests/multiVersion/libs/verify_versions.js"); {binVersion: "latest"} ], mongos: 1, - other: {mongosOptions: {binVersion: "last-stable"}}, - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false + other: {mongosOptions: {binVersion: "last-stable"}} }; var st = new ShardingTest(options); diff --git a/jstests/multiVersion/upgrade_cluster.js b/jstests/multiVersion/upgrade_cluster.js index d813a899e25..153413f828b 100644 --- a/jstests/multiVersion/upgrade_cluster.js +++ b/jstests/multiVersion/upgrade_cluster.js @@ -39,9 +39,7 @@ load('./jstests/multiVersion/libs/multi_cluster.js'); shardOptions: {binVersion: "last-stable"}, rsOptions: {binVersion: "last-stable"}, - rs: isRSCluster, - // TODO: SERVER-24163 remove after v3.4 - waitForCSRSSecondaries: false + rs: isRSCluster } }); st.configRS.awaitReplication(); diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js index 7d7a9f6eb29..994df48c536 100644 --- a/src/mongo/shell/shardingtest.js +++ b/src/mongo/shell/shardingtest.js @@ -80,9 +80,7 @@ * specify options that are common all replica members. * useHostname {boolean}: if true, use hostname of machine, * otherwise use localhost - * numReplicas {number}, - * waitForCSRSSecondaries {boolean}: if false, will not wait for the read committed view - * of the secondaries to catch up with the primary. Defaults to true. + * numReplicas {number} * } * } * @@ -1024,9 +1022,6 @@ var ShardingTest = function(params) { var mongosVerboseLevel = otherParams.hasOwnProperty('verbose') ? otherParams.verbose : 1; var numMongos = otherParams.hasOwnProperty('mongos') ? otherParams.mongos : 1; var numConfigs = otherParams.hasOwnProperty('config') ? otherParams.config : 3; - var waitForCSRSSecondaries = otherParams.hasOwnProperty('waitForCSRSSecondaries') - ? otherParams.waitForCSRSSecondaries - : true; // Default enableBalancer to false. otherParams.enableBalancer = @@ -1476,14 +1471,12 @@ var ShardingTest = function(params) { throw e; } - if (waitForCSRSSecondaries) { - // Ensure that all CSRS nodes are up to date. This is strictly needed for tests that use - // multiple mongoses. In those cases, the first mongos initializes the contents of the - // 'config' database, but without waiting for those writes to replicate to all the - // config servers then the secondary mongoses risk reading from a stale config server - // and seeing an empty config database. - this.configRS.awaitLastOpCommitted(); - } + // Ensure that all CSRS nodes are up to date. This is strictly needed for tests that use + // multiple mongoses. In those cases, the first mongos initializes the contents of the 'config' + // database, but without waiting for those writes to replicate to all the config servers then + // the secondary mongoses risk reading from a stale config server and seeing an empty config + // database. + this.configRS.awaitLastOpCommitted(); if (jsTestOptions().keyFile) { jsTest.authenticate(configConnection);