[SERVER-22817] Duplicate _id in the same collection without sharding/replicaset configured Created: 23/Feb/16  Updated: 23/Feb/16  Resolved: 23/Feb/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.0.8
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: José Mª Pérez Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-5030 Document equality should be independe... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

db.testDup.insert(
{
_id :

{ "field1":1, "field2":2 }

}

db.testDup.insert(
{
_id :

{ "field2":2, "field1":1 }

}

Participants:

 Description   

I've a compound _id that has duplicated entries as shown below.

/* 1 */
{
    "_id" : {
        "field1" : 6001,
        "field2" : 6004,
        "from" : "ORIGINAL",
        "field3" : 6006,
        "field4" : 6002
    }
}
 
/* 2 */
{
    "_id" : {
        "field1" : 6001,
        "from" : "ORIGINAL",
        "field2" : 6004,
        "field3" : 6006,
        "field4" : 6002
    }
}
 
/* 3 */
{
    "_id" : {
        "field1" : 6001,
        "field3" : 6006,
        "from" : "ORIGINAL",
        "field2" : 6004,
        "field4" : 6002
    }
}
 
/* 4 */
{
    "_id" : {
        "field1" : 6001,
        "from" : "ORIGINAL",
        "field3" : 6006,
        "field2" : 6004,
        "field4" : 6002
    }
}

The only difference is the order of the fields inside. Is this behaviour ok?



 Comments   
Comment by Scott Hernandez (Inactive) [ 23/Feb/16 ]

Yes, this is expected: SERVER-5030

Generated at Thu Feb 08 04:01:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.