Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72812

Improve error message when invoking sh.splitFind on an empty collection

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Sharding NYC
    • Fully Compatible
    • Sharding NYC 2023-06-12, Sharding NYC 2023-06-26
    • 1

      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

            Assignee:
            david.chen@mongodb.com David Chen (Inactive)
            Reporter:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: