-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Sharding 2019-02-11, Sharding 2019-02-25, Sharding 2019-05-06, Sharding 2019-05-20
-
(copied to CRM)
Even though a collection exists on some shards and not on others, it's confusing to get "request doesn't allow collection to be created implicitly" error.
mongos> db.bar.createIndex( { _id: 1, x: 1, c: 1}, { unique: true }); { "raw" : { "shardA/Kays-MacBook-Pro-2.local:27018,Kays-MacBook-Pro-2.local:27019,Kays-MacBook-Pro-2.local:27020" : { "createdCollectionAutomatically" : false, "numIndexesBefore" : 4, "numIndexesAfter" : 5, "ok" : 1 }, "shardB/Kays-MacBook-Pro-2.local:27021,Kays-MacBook-Pro-2.local:27022,Kays-MacBook-Pro-2.local:27023" : { "ok" : 0, "errmsg" : "request doesn't allow collection to be created implicitly", "code" : 227, "codeName" : "CannotImplicitlyCreateCollection", "ns" : "test.bar" } }, "ok" : 1, "operationTime" : Timestamp(1543854685, 3), "$clusterTime" : { "clusterTime" : Timestamp(1543854685, 5), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } }