[SERVER-22327] Replication fails with error on document with multiple _id fields Created: 27/Jan/16  Updated: 29/Jan/16  Resolved: 27/Jan/16

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

Type: Bug Priority: Major - P3
Reporter: Support support 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-19361 Insert of document with duplicate _id... Closed
Operating System: ALL
Participants:

 Description   

My 3.0.5 wired tiger replica secondary failed to sync with the error

2016-01-26T21:45:15.675+0000 E REPL     [repl writer worker 5] writer worker caught exception:  :: caused by :: 16836 The _id field cannot be changed from {_id: null} to {_id: ObjectId('56a7e8ec19637e8640000001')}. on: { ts: Timestamp 1453844715000|94, h: -6008654494445131386, v: 2, op: "i", ns: "xxxxx.xxxxxx_users", o: { _id: null, _type: "SuperAdmin", email: "xxxx+xxxx@xxx.xx", password_digest: "$2a$10$44l7q88l1FW8E4FiHR61CeGdAmV/uBAQiV3emGY9RgXZmW1WENDKe", updated_at: new Date(1453844715921), created_at: new Date(1453844715921), _id: ObjectId('56a7e8ec19637e8640000001') } }
2016-01-26T21:45:15.675+0000 I -        [repl writer worker 5] Fatal Assertion 16360
2016-01-26T21:45:15.678+0000 I -        [repl writer worker 5]

I had to clean out and resync the data for it to work.



 Comments   
Comment by Support support [ 29/Jan/16 ]

Do these records need to be cleaned up manually before the upgrade to 3.0.8?

Comment by Ramon Fernandez Marina [ 27/Jan/16 ]

support@mongodirector.com, it seems you were able to insert documents with two _id fields. This was mistakenly allowed by some drivers and the server in the past, but not after SERVER-19361 was implemented.

I'd recommend you upgrade to MongoDB 3.0.7 or later (3.0.9 and 3.2.1 are the most recent stable releases) and clean all documents with more than one _id field.

Regards,
Ramón.

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