-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
If a data shard is not specified for a collection creation, the default is currently to choose the dbPrimary (sharded, unsharded). However, now that the balancer is moving unsharded collections and those collections can live outside the dbprimary, we can instead choose the least loaded shard by querying the balancer and use that as the data shard.
We should still always choose the dbPrimary if unsharded collection balancing is disabled.