-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.1.0, 2.1.1, 2.1.2, 2.2.0-rc0
-
Component/s: Write Ops
-
Environment:All
-
Major Change
-
ALL
The following findAndModify succeeds on 2.0 and lower and fails on 2.1 and higher :
db.test.findAndModify({query:
{f:1}, update:{$set:{f:2}}, upsert:true, new:true})
With the following (somewhat vague) error : uncaught exception: findAndModifyFailed failed: "exception: assertion src\\mongo\\db\\commands
find_and_modify.cpp:146"
The expected behaviour would be that this operation returns
{ "_id" : ... , "f" : 2 }but as shown it fails.