Details
-
Bug
-
Resolution: Done
-
Major - P3
-
2.1.0, 2.1.1, 2.1.2, 2.2.0-rc0
-
All
-
Major Change
-
ALL
Description
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.