Before to create a sharded collection it is currently required to invoke the enableSharding command. This command doesn't really do much apart from setting a flag in config.databases, that is only consumed by the shardCollection command.
This additional step is not very useful and not really required in order to create a sharded collection, additionally it contributes to make the sharding experience more complicated than than the replica set one without any real benefit.
This ticket contain a proposal to make the enableSharding command optional and to deprecate it.
- It won't be necessary anymore to call enableSharding before to shard a collection.
- We will still keep support for enableSharding command because users are using it to select the database primaryShard before to create a collection. So enableSharding will really behave like a "createDatabase" that you can use if you want to create a database with specific options, otherwise default options will be chosen automatically on the implicit creation (like the primarShard).
Additionally the name "enableSharding" will become misleading since it won't really "enable sharding" anymore, so we will introduce a new createDatabase command as an alias of the old enableSharding. In this sense the new createDatabase command will be very similar to createCollection , it will be optional but you can use it to specify particular options for database creation.