summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Banala <arun.banala@mongodb.com>2020-01-24 11:34:07 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-01-24 17:14:53 +0000
commit6ae36926ee13cf88de3aa6391e56bcfbc020a4b3 (patch)
tree47694f73c3f08cb1875cf749a339a4127f2e97ce
parentdc876ffbec377481945bd4e0e814b587a1bf668b (diff)
downloadmongo-6ae36926ee13cf88de3aa6391e56bcfbc020a4b3.tar.gz
SERVER-45719 Set failpoint to allow test fuzzer to allow FCV 4.2 downgrade in the presence of compound hashed shard key
-rw-r--r--jstests/hooks/run_validate_collections.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/jstests/hooks/run_validate_collections.js b/jstests/hooks/run_validate_collections.js
index eeabba7e10e..12104210f23 100644
--- a/jstests/hooks/run_validate_collections.js
+++ b/jstests/hooks/run_validate_collections.js
@@ -21,6 +21,13 @@ if (topology.type === Topology.kStandalone) {
} else if (topology.type === Topology.kShardedCluster) {
hostList.push(...topology.configsvr.nodes);
+ // Set the fail point on config server to allow FCV downgrade even in the presence of a
+ // collection sharded on a compound hashed key.
+ // TODO SERVER-45489: Delete this logic after branching for 4.4.
+ const configSvrConn = new Mongo(topology.configsvr.primary);
+ assert.commandWorked(configSvrConn.getDB('admin').runCommand(
+ {configureFailPoint: "allowFCVDowngradeWithCompoundHashedShardKey", mode: "alwaysOn"}));
+
for (let shardName of Object.keys(topology.shards)) {
const shard = topology.shards[shardName];
@@ -39,4 +46,11 @@ if (topology.type === Topology.kStandalone) {
}
new CollectionValidator().validateNodes(hostList, setFCVHost);
+
+// Disable the failpoint that was set earlier on sharded clusters.
+if (topology.type === Topology.kShardedCluster) {
+ const configSvrConn = new Mongo(topology.configsvr.primary);
+ assert.commandWorked(configSvrConn.getDB('admin').runCommand(
+ {configureFailPoint: "allowFCVDowngradeWithCompoundHashedShardKey", mode: "off"}));
+}
})();