summaryrefslogtreecommitdiff
path: root/jstests/sharding/reshard_collection_basic.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/reshard_collection_basic.js')
-rw-r--r--jstests/sharding/reshard_collection_basic.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/jstests/sharding/reshard_collection_basic.js b/jstests/sharding/reshard_collection_basic.js
index 4b527757ecd..c235243264a 100644
--- a/jstests/sharding/reshard_collection_basic.js
+++ b/jstests/sharding/reshard_collection_basic.js
@@ -150,14 +150,6 @@ let verifyAllShardingCollectionsRemoved = (tempReshardingCollName) => {
.itcount());
};
-let verifyTagsDocumentsAfterOperationCompletes = (ns, shardKeyPattern) => {
- const tagsArr = mongos.getCollection('config.tags').find({ns: ns}).toArray();
- for (let i = 0; i < tagsArr.length; ++i) {
- assert.eq(Object.keys(tagsArr[i]["min"]), shardKeyPattern);
- assert.eq(Object.keys(tagsArr[i]["max"]), shardKeyPattern);
- }
-};
-
let assertReshardCollOkWithPreset = (commandObj, presetReshardedChunks) => {
assert.commandWorked(mongos.adminCommand({shardCollection: ns, key: {oldKey: 1}}));
@@ -174,9 +166,6 @@ let assertReshardCollOkWithPreset = (commandObj, presetReshardedChunks) => {
verifyTemporaryReshardingCollectionExistsWithCorrectOptions(
getAllShardIdsFromExpectedChunks(presetReshardedChunks));
-
- verifyTagsDocumentsAfterOperationCompletes(ns, Object.keys(commandObj.key));
-
verifyChunksMatchExpected(presetReshardedChunks.length, presetReshardedChunks);
mongos.getDB(kDbName)[collName].drop();
@@ -196,8 +185,6 @@ let assertReshardCollOk = (commandObj, expectedChunks) => {
assert.commandWorked(mongos.adminCommand(commandObj));
- verifyTagsDocumentsAfterOperationCompletes(ns, Object.keys(commandObj.key));
-
verifyChunksMatchExpected(expectedChunks);
mongos.getDB(kDbName)[collName].drop();
@@ -259,14 +246,6 @@ assert.commandFailedWithCode(mongos.adminCommand({
}),
4952607);
-jsTest.log("Fail if zone provided is invalid for storage.");
-assert.commandFailedWithCode(mongos.adminCommand({
- reshardCollection: ns,
- key: {"_id": "hashed"},
- zones: [{min: {"_id": {"$minKey": 1}}, max: {"_id": {"$maxKey": 1}}, zone: "Namezone"}]
-}),
- ErrorCodes.BadValue);
-
jsTestLog("Fail if splitting collection into multiple chunks while it is still empty.");
assert.commandFailedWithCode(
mongos.adminCommand({reshardCollection: ns, key: {b: 1}, numInitialChunks: 2}), 4952606);
@@ -370,20 +349,6 @@ assertReshardCollOk({
},
1);
-jsTest.log("Succeed if zones are not empty.");
-assert.commandWorked(
- mongos.adminCommand({addShardToZone: st.shard1.shardName, zone: existingZoneName}));
-assert.commandWorked(st.s.adminCommand(
- {updateZoneKeyRange: ns, min: {oldKey: 0}, max: {oldKey: 5}, zone: existingZoneName}));
-assertReshardCollOk({
- reshardCollection: ns,
- key: {oldKey: 1, newKey: 1},
- unique: false,
- collation: {locale: 'simple'},
- zones: [{zone: existingZoneName, min: {oldKey: 0}, max: {oldKey: 5}}]
-},
- 3);
-
jsTest.log("Succeed with hashed shard key that provides enough cardinality.");
assert.commandWorked(
mongos.adminCommand({shardCollection: ns, key: {a: "hashed"}, numInitialChunks: 5}));