-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.1
-
Component/s: None
-
None
-
Linux
According to http://www.mongodb.org/display/DOCS/Capped+Collections, setting autoIndexId:true should create a unique key index on the _id field (for replication of capped collections).
My capped collection got a non-unique index on _id instead:
> db.createCollection("myColl", {capped:true, size:536870912000, autoIndexId:true}) { "ok" : 1 } > db.myColl.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "dbname.myColl", "name" : "_id_" } ]
If the unique index on _id is no longer needed, this might be a documentation bug.
- duplicates
-
SERVER-5335 Creation of _id index should automatically add unique:true to index spec
- Backlog