[SERVER-68130] AutoSplitVector could generate response bigger than BSONObjMaxUserSize Created: 19/Jul/22 Updated: 29/Oct/23 Resolved: 25/Jul/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.1, 4.4.16, 4.2.22, 5.0.11, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v6.0, v5.0, v4.4, v4.2
|
||||||||
| Sprint: | Sharding EMEA 2022-08-08 | ||||||||
| Participants: | |||||||||
| Description |
|
In HELP-35620 AutoSplitVector was called by the create collection coordinator and generated a response with too many split points. So when the response was serialized to a BSONObject the command failed with a BSONObjectTooLarge error. The AutoSplitVector has a logic in place to prevent this. In fact, while building the split points array, it tries to predict the final BSON object size and stops in case the maximum size is reached. As demonstrated in HELP-35620 this logic is somehow broken. From the customer's log we can see that the AutoSplitVector failed with BSONObjectTooLarge:
From the collection entry we can derive the ShardKey pattern for the collection:
And from the chunks we can derive a possible split point structure:
|
| Comments |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 26/Jul/22 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 25/Jul/22 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |