From 6ae36926ee13cf88de3aa6391e56bcfbc020a4b3 Mon Sep 17 00:00:00 2001 From: Arun Banala Date: Fri, 24 Jan 2020 11:34:07 +0000 Subject: SERVER-45719 Set failpoint to allow test fuzzer to allow FCV 4.2 downgrade in the presence of compound hashed shard key --- jstests/hooks/run_validate_collections.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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"})); +} })(); -- cgit v1.2.1