-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query
-
ALL
where test.bar
shard key:
unique: true
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) } } }
mongos> db.bar.getIndexes() [ { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test.bar" }, { "v" : 2, "unique" : true, "key" : { "x" : 1 }, "name" : "x_1", "ns" : "test.bar" }, { "v" : 2, "unique" : true, "key" : { "_id" : 1, "x" : 1, "c" : 1 }, "name" : "_id_1_x_1_c_1", "ns" : "test.bar" }