[DOCS-9187] upsert is not atomic Created: 21/Oct/16  Updated: 13/Apr/21  Resolved: 13/Apr/21

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Golden Assignee: Andrew Feierabend (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Start to Start
Related
Participants:
Days since reply: 2 years, 43 weeks, 1 day ago
Epic Link: DOCSP-11701
Story Points: 2

 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



 Comments   
Comment by Githook User [ 13/Apr/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCSP-15179-DOCS-9187 upsert with unique index refactor
Branch: v4.2
https://github.com/mongodb/docs/commit/08e4281570ef7438df6e0fb380778f0ad157561d

Comment by Githook User [ 13/Apr/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCSP-15179-DOCS-9187 upsert with unique index refactor
Branch: master
https://github.com/mongodb/docs/commit/cbc3aa8e31fca03d3e5d2e009d728b6e7f92dbcd

Comment by Githook User [ 13/Apr/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCSP-15179-DOCS-9187 upsert with unique index refactor
Branch: v5.0
https://github.com/mongodb/docs/commit/414f8f50ab85f6f609e28426f6bad8a9d205be19

Generated at Thu Feb 08 07:57:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.