-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.6, 2.4.12
-
Component/s: Replication, Stability
-
None
-
ALL
-
Upserting a document where the the '_id' field in the query pattern is a regex results in a new document being created with the regex being stored in the '_id' field. This can lead to duplicate key errors on the secondaries when they process the oplog, resulting in a crash.
I have tested this on MongoDB 2.4.6 and 2.4.12 - both versions are affected.
MongoDB 2.6.5 handles this case differently and inserts the new document with an ObjectId for the '_id' field. As such, it does not appear to be affected.
- duplicates
-
SERVER-16339 Updating by _id field with a regex breaks replication in 2.4
- Closed
- is related to
-
SERVER-9502 Using regex in _id breaks replication
- Closed