summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorYuhong Zhang <yuhong.zhang@mongodb.com>2022-03-14 15:59:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-14 16:45:21 +0000
commit4beaff69ac4c8a5f740f0a5c71cb23b7ab9adab7 (patch)
tree0540da22a81a471732b0cd3ce177f11e088359bd /jstests
parent0f28913257b0d6fee3b92927d7ec16a2ad54a0a0 (diff)
downloadmongo-4beaff69ac4c8a5f740f0a5c71cb23b7ab9adab7.tar.gz
SERVER-64471 Skip checking prepareUnique on an already unique index during collMod unique conversion
Diffstat (limited to 'jstests')
-rw-r--r--jstests/noPassthrough/collmod_index_noop.js10
1 files changed, 0 insertions, 10 deletions
diff --git a/jstests/noPassthrough/collmod_index_noop.js b/jstests/noPassthrough/collmod_index_noop.js
index 2e16352bd6e..a769b4d3630 100644
--- a/jstests/noPassthrough/collmod_index_noop.js
+++ b/jstests/noPassthrough/collmod_index_noop.js
@@ -140,8 +140,6 @@ if (collModIndexUniqueEnabled) {
// Validate that if the 'unique' option is specified but is a no-op, the operation as a whole
// will be a no-op.
- assert.commandWorked(primaryDB.runCommand(
- {collMod: collName, index: {keyPattern: {d: 1}, prepareUnique: true}}));
result = assert.commandWorked(primaryDB.runCommand({
"collMod": primaryColl.getName(),
"index": {"name": "d_1", "unique": true},
@@ -149,7 +147,6 @@ if (collModIndexUniqueEnabled) {
validateResultForCollMod(result, {});
validateCollModOplogEntryCount({
"o.index.name": "d_1",
- "o.index.prepareUnique": {$exists: false},
},
0);
@@ -161,8 +158,6 @@ if (collModIndexUniqueEnabled) {
// Validate that if both the 'hidden' and 'unique' options are specified but the
// 'hidden' and 'unique' options are no-ops, the operation as a whole will be a no-op.
- assert.commandWorked(primaryDB.runCommand(
- {collMod: collName, index: {keyPattern: {e: 1}, prepareUnique: true}}));
result = assert.commandWorked(primaryDB.runCommand({
"collMod": primaryColl.getName(),
"index": {"name": "e_1", "hidden": true, "unique": true},
@@ -170,7 +165,6 @@ if (collModIndexUniqueEnabled) {
validateResultForCollMod(result, {});
validateCollModOplogEntryCount({
"o.index.name": "e_1",
- "o.index.prepareUnique": {$exists: false},
},
0);
@@ -184,8 +178,6 @@ if (collModIndexUniqueEnabled) {
// 'unique' option is a no-op, the operation as a whole will NOT be a no-op - instead, it will
// generate an oplog entry with only 'expireAfterSeconds'. Ditto for the command result returned
// to the user.
- assert.commandWorked(primaryDB.runCommand(
- {collMod: collName, index: {keyPattern: {f: 1}, prepareUnique: true}}));
result = assert.commandWorked(primaryDB.runCommand({
"collMod": primaryColl.getName(),
"index": {"name": "f_1", "expireAfterSeconds": 20, "unique": true},
@@ -209,8 +201,6 @@ if (collModIndexUniqueEnabled) {
// 'hidden' and 'unique' options are no-ops, the operation as a whole will NOT be a no-op -
// instead, it will generate an oplog entry with only 'expireAfterSeconds'. Ditto for the
// command result returned to the user.
- assert.commandWorked(primaryDB.runCommand(
- {collMod: collName, index: {keyPattern: {g: 1}, prepareUnique: true}}));
result = assert.commandWorked(primaryDB.runCommand({
"collMod": primaryColl.getName(),
"index": {"name": "g_1", "expireAfterSeconds": 30, "hidden": true, "unique": true},