[SERVER-22865] splitChunk returns with error cause truncated Created: 25/Feb/16  Updated: 06/Dec/22  Resolved: 12/Dec/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.3.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

Example error:

{
    "cause" : "SplitFailed: splitChunk failed - cmd: { splitChunk: \"test.user\", keyPattern: { x: 1.0 }, min: { x: MinKey }, max: { x: MaxKey }, from: \"shard0000\", splitKeys: [ { x: 0.0 } ], configdb: \"test-configRS/ren-desktop:20004,ren-desktop:20005,ren-desktop:20006\", shardVersion: [ Timestamp 1000|0, ObjectId('56cf64adedc7308da7815029') ], epoch: ObjectId('56cf64adedc7308da7815029') } result: { ok: 0.0, errmsg: \"splitChunk cannot split chunk [{ x: MinKey },{ x: MaxKey }) :: caused by :: Operation timed out, request was RemoteCommand 14 -- target:ren-desktop:20...\" }",
    "ok" : 0,
    "errmsg" : "split failed"
}

This is because BSONElement::toString has a 150 char limit for strings unless full = true. So the error message generated here needs to be shortened or use full = true:

https://github.com/mongodb/mongo/blob/r3.3.2/src/mongo/s/chunk.cpp#L458



 Comments   
Comment by Randolph Tan [ 25/Feb/16 ]

Update: Found out that the format changes in SERVER-22849 will make this specific case go away.

Comment by Eric Milkie [ 25/Feb/16 ]

Maybe we should get rid of or raise the limit completely, for all BSON?

Generated at Thu Feb 08 04:01:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.