PM-1168 will allow implicitly creating collections inside transactions, which would fail in sharding today because of this uassert in DatabaseImpl::createCollection. (Hitting the uassert would abort the transaction on the shard.)
Since the implicit collection creation loop through the config server is not currently used for adding new collections immediately into the sharding catalog, we will just delete this loop and revisit implicit collection creation as part of other catalog work in the future.
Background
In sharding, shards never implicitly create collections on themselves. Instead, if they receive a request that would implicitly create a collection, they throw here.
The exception is caught in the service entry point on the shard, and a handler that sends _configsvrCreateCollection to the config server is invoked.
The _configsvrCreateCollection command then creates the collection on the primary shard.
- is depended on by
-
SERVER-43198 Zombie writes from failing $merge should not be able to re-create a collection
- Backlog
-
SERVER-43851 Work around zombie writes in $merge tests
- Closed