(At behackett's suggestion, I'm opening this separate from SERVER-6439 to highlight the impact on _id, specifically.)
A bug in the Perl driver revealed that it's possible to insert a document with duplicate/multiple _id fields.
> db.duptest.find() { "_id" : NumberLong(1), "_id" : NumberLong(1) } { "_id" : NumberLong(2), "_id" : NumberLong(2) }
I reproduced this against 3.1.5, 3.0.4, 2.6.10, and 2.4.14.
- is duplicated by
-
SERVER-22327 Replication fails with error on document with multiple _id fields
- Closed
-
TOOLS-148 Produce error on duplicate keys at the same level
- Closed
- related to
-
SERVER-75879 Upsert permits document to contain multiple _id fields
- Closed
-
SERVER-6439 Duplicate fields at the same level should not be allowed
- Backlog
- links to