[SERVER-6829] splitting with few chunks will never succeed if many duplicates Created: 22/Aug/12  Updated: 06/Dec/22  Resolved: 14/Aug/18

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

Type: Bug Priority: Major - P3
Reporter: Greg Studer 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:
Depends
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

If for some reason the data being inserted has a few duplicate shard keys (no so many as to cause problems) we will never split the initial chunk.

For example, if we're inserting documents of size 300k and insert two documents in a row with the same shard key each time, we'll never split b/c for a split with only one chunk, the maxChunkSize is forced to 1024 bytes, and 1/2 of that is 500k.

Would be better to specify a different parameter as a target chunk size and split between targetChunkSize and maxChunkSize wherever possible. Mongod could also be smarter here since it knows the actual size of the initial chunk.


Generated at Thu Feb 08 03:12:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.