Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Our documentation for update and findAndModify mention atomicity but don't caveat that only existing documents can be atomically modified. upsert operations are not atomic and can result (among other things) in duplicates or duplicate key errors. (See SERVER-14322.)
The documentation should clearly warn users about this potential problem with upserts.
h/t to john.l.page@mongodb.com and rassi for highlighting this issue in the driver team slack channel