summaryrefslogtreecommitdiff
path: root/jstests/multiVersion/config_chunks_tags_set_fcv.js
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-02-20 21:42:07 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-05 13:03:43 +0000
commit747ff353cbc819d032fa727d4bd7ffad16ea0437 (patch)
treed9b3d7e9af26138d7b74e0416a93d6110e326af0 /jstests/multiVersion/config_chunks_tags_set_fcv.js
parent7c4b875a8858c5bd5efc9bf4f285f7f440fdfdc0 (diff)
downloadmongo-747ff353cbc819d032fa727d4bd7ffad16ea0437.tar.gz
SERVER-45692 add explicit RWC to inter-node commands (even if merely kImplicitDefault)
Diffstat (limited to 'jstests/multiVersion/config_chunks_tags_set_fcv.js')
-rw-r--r--jstests/multiVersion/config_chunks_tags_set_fcv.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/jstests/multiVersion/config_chunks_tags_set_fcv.js b/jstests/multiVersion/config_chunks_tags_set_fcv.js
index 66189823b59..14d14f663f4 100644
--- a/jstests/multiVersion/config_chunks_tags_set_fcv.js
+++ b/jstests/multiVersion/config_chunks_tags_set_fcv.js
@@ -16,9 +16,18 @@ function verifyChunkOperationsFailDuringSetFCV(st, ns) {
ErrorCodes.ConflictingOperationInProgress);
verifyChunkDistribution(st, ns, [2, 1]);
- assert.commandFailedWithCode(
- st.s.adminCommand({moveChunk: ns, find: {_id: 0}, to: st.shard0.shardName}),
- ErrorCodes.ConflictingOperationInProgress);
+ // Shards running with old FCV won't automatically add writeConcern when running moveChunk or
+ // _recvChunkStart on shards, which shards running FCV find objectionable. So we pass explicit
+ // writeConcern to the mongos moveChunk command (which also requires secondaryThrottle: true),
+ // which causes it to be passed through to the shard commands.
+ assert.commandFailedWithCode(st.s.adminCommand({
+ moveChunk: ns,
+ find: {_id: 0},
+ to: st.shard0.shardName,
+ secondaryThrottle: true,
+ writeConcern: {w: 1}
+ }),
+ ErrorCodes.ConflictingOperationInProgress);
verifyChunkDistribution(st, ns, [2, 1]);
assert.commandFailedWithCode(