[SERVER-72812] Improve error message when invoking sh.splitFind on an empty collection Created: 12/Jan/23 Updated: 29/Oct/23 Resolved: 20/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Kshitij Gupta | Assignee: | David Chen (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | intern, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding NYC
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding NYC 2023-06-12, Sharding NYC 2023-06-26 |
| Participants: | |
| Story Points: | 1 |
| Description |
|
Currently this will error with `need to specify the desired max chunk size` on an empty collection because mongos runs the splitVector command with force:true on the shard which uses the dataSize as the maxChunkSizeBytes variable. But the dataSize for an empty collection will be zero so it returns a generic error about maxChunkSizeBytes even though that's not something the user of the split command has control over.
https://github.com/mongodb/mongo/blob/r6.0.3/src/mongo/db/s/split_vector.cpp#L130-L137 |
| Comments |
| Comment by Githook User [ 20/Jun/23 ] |
|
Author: {'name': 'David Chen', 'email': 'david.chen@mongodb.com', 'username': ''}Message: |