diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2020-04-15 09:23:45 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-16 18:30:57 +0000 |
commit | 4ab404081f02d52285371c5a3b8520429a74e047 (patch) | |
tree | f7f27810f32447bbb7d50bb7a347e18ae82ecdce /jstests/noPassthrough/commit_quorum.js | |
parent | 44af4b2915cef5afcfe63104fb902e4519ffa889 (diff) | |
download | mongo-4ab404081f02d52285371c5a3b8520429a74e047.tar.gz |
SERVER-47464 Prevent SetIndexCommitQuorum cmd from changing commit quorum on to off & vice versa.
Diffstat (limited to 'jstests/noPassthrough/commit_quorum.js')
-rw-r--r-- | jstests/noPassthrough/commit_quorum.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/noPassthrough/commit_quorum.js b/jstests/noPassthrough/commit_quorum.js index c240ad01f13..cdf3f204228 100644 --- a/jstests/noPassthrough/commit_quorum.js +++ b/jstests/noPassthrough/commit_quorum.js @@ -88,9 +88,11 @@ try { indexNames: ['a_1'], commitQuorum: "someTag" })); - - assert.commandWorked(testDB.runCommand( + // setIndexCommitQuorum should fail as it is illegal to disable commit quorum for in-progress + // index builds with commit quorum enabled. + assert.commandFailed(testDB.runCommand( {setIndexCommitQuorum: 'twoPhaseIndexBuild', indexNames: ['a_1'], commitQuorum: 0})); + assert.commandWorked(testDB.runCommand( {setIndexCommitQuorum: 'twoPhaseIndexBuild', indexNames: ['a_1'], commitQuorum: 2})); assert.commandWorked(testDB.runCommand({ |