-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
ALL
-
151
As part of SERVER-49117, validation for the _id field ensuring that it is not possible to insert a document with an _id field that is an object containing $-prefixed fields was removed. This code (https://github.com/mongodb/mongo/blob/master/src/mongo/db/repl/oplog.cpp#L1360-L1366) to update the oplog calls an update on the _id field along a path that still validates that _id, which caused BF-21074. The simple solution is to add the _id validation back here: https://github.com/mongodb/mongo/commit/995f0406d72b1a15d18b2df2d8c0afa0c4c5b774#diff-5295b5000db7b3711a31f86ebbe374e929270da88b36b20d3459c9b1d4f48d17R135-R136