diff options
Diffstat (limited to 'jstests/sharding/analyze_shard_key')
-rw-r--r-- | jstests/sharding/analyze_shard_key/read_and_write_distribution.js | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/jstests/sharding/analyze_shard_key/read_and_write_distribution.js b/jstests/sharding/analyze_shard_key/read_and_write_distribution.js index 20c90de8afa..0927f9e6e11 100644 --- a/jstests/sharding/analyze_shard_key/read_and_write_distribution.js +++ b/jstests/sharding/analyze_shard_key/read_and_write_distribution.js @@ -525,7 +525,10 @@ const mongodSetParameterOpts = { queryAnalysisSamplerConfigurationRefreshSecs, queryAnalysisWriterIntervalSecs, analyzeShardKeyNumRanges, - logComponentVerbosity: tojson({sharding: 2}) + logComponentVerbosity: tojson({sharding: 2}), + // This test expects every query to get sampled regardless of which mongos or mongod it runs + // against. + "failpoint.queryAnalysisCoordinatorDistributeSampleRateEqually": tojson({mode: "alwaysOn"}), }; const mongosSetParametersOpts = { queryAnalysisSamplerConfigurationRefreshSecs, @@ -543,17 +546,7 @@ const mongosSetParametersOpts = { mongos: numMongoses, shards: numShards, rs: {nodes: 2, setParameter: mongodSetParameterOpts}, - mongosOptions: {setParameter: mongosSetParametersOpts}, - other: { - configOptions: { - setParameter: { - // This test expects every query to get sampled regardless of which mongos or - // mongod routes it. - "failpoint.queryAnalysisCoordinatorDistributeSampleRateEqually": - tojson({mode: "alwaysOn"}) - } - } - }, + mongosOptions: {setParameter: mongosSetParametersOpts} }); const fixture = { @@ -618,17 +611,7 @@ const mongosSetParametersOpts = { jsTest.log("Verify that on a replica set the analyzeShardKey command returns correct read " + "and write distribution metrics"); - const rst = new ReplSetTest({ - nodes: 2, - nodeOptions: { - setParameter: Object.assign({}, mongodSetParameterOpts, { - // This test expects every query to get sampled regardless of which mongod it runs - // on. - "failpoint.queryAnalysisCoordinatorDistributeSampleRateEqually": - tojson({mode: "alwaysOn"}) - }) - } - }); + const rst = new ReplSetTest({nodes: 2, nodeOptions: {setParameter: mongodSetParameterOpts}}); rst.startSet(); rst.initiate(); const primary = rst.getPrimary(); |