[SERVER-66041] Chunk cloner must never consider `too big` a chunk with only one document Created: 28/Apr/22  Updated: 29/Oct/23  Resolved: 28/Apr/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.2, 5.0.9, 6.0.0-rc4, 4.4.15, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.3, v5.0, v4.4
Sprint: Sharding EMEA 2022-05-02
Participants:

 Description   

The MigrationChunkClonerSourceLegacy is using the average object size to estimate how many objects a full chunk would be able to contain. However, the current semantic is disallowing moving chunks containing exactly one document whose size is greater than collection's max chunk size.

Trivial scenario to reproduce the bug:

  • Set the default chunk size to 1MB
  • Create a collection with 100 chunks each containing one documents of 1.1 MB
  • Balancing will never happen because maxRecsWhenFull will be set to zero so it's not even possible to pad some slack


 Comments   
Comment by Githook User [ 29/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-66041 Chunk cloner must never consider `too big` a chunk with only one document
Branch: v4.4
https://github.com/mongodb/mongo/commit/f38decf33bb2c9d12ae45db8fca67f02b880d60f

Comment by Githook User [ 29/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-66041 Chunk cloner must never consider `too big` a chunk with only one document
Branch: v5.3
https://github.com/mongodb/mongo/commit/0cd9f85a25b2edd2da55917c91f7428b05730361

Comment by Githook User [ 29/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-66041 Chunk cloner must never consider `too big` a chunk with only one document
Branch: v6.0
https://github.com/mongodb/mongo/commit/e714e06e04a828fc6514be83e5eed8fc40f4a529

Comment by Githook User [ 29/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-66041 Chunk cloner must never consider `too big` a chunk with only one document
Branch: v5.0
https://github.com/mongodb/mongo/commit/b25bbb083350c46e59bd5f66a7a44d7dfbdbbd1a

Comment by Githook User [ 28/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-66041 Chunk cloner must never consider `too big` a chunk with only one document
Branch: master
https://github.com/mongodb/mongo/commit/cb3e17d25762581deacefb88d7fd7ceab5eec3ba

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