See: SERVER-10350 for discussion.
The behavior of updates and findAndModify with the upsert flag when the query predicate is on a unique index is the same. The findAndModify documentation explain this, but the update docs do not.
See the end of this page: http://docs.mongodb.org/manual/reference/command/findAndModify/
User suggests adding to this page as well:
http://docs.mongodb.org/manual/core/create/#crud-create-update
- related to
-
SERVER-10350 Atomicity of Upserts on multi field unique index
- Closed