-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:STG
-
Sharding EMEA
-
ALL
-
Sharding EMEA 2023-04-17
Summary
PreSplit and allocate the required chunks in a sharded cluster
Motivation
Who is the affected end user?
Developers who are trying to work in the sharded cluster environment
How does this affect the end user?
The developers are currently blocked and are using the sharded cluster without pre splitting.
How likely is it that this problem or use case will occur?
It occurs frequently.
If the problem does occur, what are the consequences and how severe are they?
Not able to presplit and create chunks in sharded cluster
Is this issue urgent?
Yeah
Database name : chasetest
Collection name: documents
Steps:
sh.disableBalancing("chasetest.documents")
sh.startBalancer();
sh.enableSharding("chasetest");
sh.shardCollection('chasetest.documents', {'SHARD_KEY':1})
for(x=0;x<840;x++) {
print(`sh.splitAt("chasetest.documents", { "SHARD_KEY": ${x} })`)
printjson(sh.splitAt("chasetest.documents", {"SHARD_KEY": x}))
}
MongoError: split failed :: caused by :: chunk operation commit failed: version 4|3||637fee532a5d9628d64e06eb||Timestamp(1669328467, 4) doesn't exist in namespace: chasetest.documents. Unable to save chunk ops. Command: { applyOps: [ { op: "u", b: true, ns: "config.chunks", o: { _id: ObjectId('637fee87f998b1216f78a0ef'), uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), min:
{ SHARD_KEY: 18 }, max: { SHARD_KEY: 20 }, shard: "dev-65148-csi-gms-ingestion-api-dev-rs1", lastmod: Timestamp(4, 2), history: [ { validAfter: Timestamp(1669328467, 4), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } ] }, o2: { _id: ObjectId('637fee87f998b1216f78a0ef') } }, { op: "u", b: true, ns: "config.chunks", o: { _id: ObjectId('637fee8df998b1216f78a180'), uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), min:
{ SHARD_KEY: 20 }, max: { SHARD_KEY: MaxKey }, shard: "dev-65148-csi-gms-ingestion-api-dev-rs1", lastmod: Timestamp(4, 3), history: [ { validAfter: Timestamp(1669328467, 4), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } ] }, o2: { _id: ObjectId('637fee8df998b1216f78a180') } } ], preCondition: [ { ns: "config.chunks", q: { query: { min:
{ SHARD_KEY: 18 }, max: { SHARD_KEY: MaxKey }, uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14") }, orderby: { lastmod: -1 } }, res: { uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } } ], writeConcern: { w: 1, wtimeout: 0 } }. Result: { got: {}, whatFailed: { ns: "config.chunks", q: { query: { min:
{ SHARD_KEY: 18 }, max: { SHARD_KEY: MaxKey }, uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14") }, orderby: { lastmod: -1 } }, res: { uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } }, ok: 0.0, errmsg: "preCondition failed", code: 2, codeName: "BadValue", $gleStats: { lastOpTime:
{ ts: Timestamp(1669328525, 6), t: 4 }, electionId: ObjectId('7fffffff0000000000000004') }, lastCommittedOpTime: Timestamp(1669328525, 6), $clusterTime: { clusterTime: Timestamp(1669328525, 6), signature:
{ hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 }}, $configTime: Timestamp(1669328525, 6), $topologyTime: Timestamp(1658235601, 4), operationTime: Timestamp(1669328525, 6) } :: caused by :: preCondition failed
- duplicates
-
SERVER-54979 Calling move/split/mergeChunk after one another from different MongoS is not causally consistent
- Backlog
-
SERVER-68485 Merge and Split commands should not use the CSR to check the shard version
- Closed