-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.0, 2.2.0
-
Component/s: Write Ops
-
None
-
Environment:centos, mongo command-line client, mongo ruby driver
-
Linux
This may affect more versions, but I've only tested on 2.2.0 and 2.0.0.
Trying to do an upsert with a $not modifier in the find:
db.counters.update({"_id" : {a: 5, b:10}, "$not":{"value.tx":"5d"}}, {"$inc":{"value.c":4}, "$set":{"value.tx":"5d"}}, true)
Works for the first insert. But the second always fails with the following exception, no matter what $not is set to:
E11000 duplicate key error index: databaseone.counters.$_id_ dup key: { : { a: 5.0, b: 10.0 } }