diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2023-04-06 05:20:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-06 05:57:13 +0000 |
commit | e8b6fe12d6a962e537ef2503a22789936f507a3f (patch) | |
tree | 67e83a821be05e3ccb7b209aeaaa33eef30d9dcf /jstests/sharding/analyze_shard_key | |
parent | ddfd88cd19bd47e57b49aa360c29ab82d532e18e (diff) | |
download | mongo-e8b6fe12d6a962e537ef2503a22789936f507a3f.tar.gz |
SERVER-75534 Make sure that read_and_write_distribution.js also sets the fail point when it runs in the catalog shard suites
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(); |