Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9187

upsert is not atomic

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 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

      Attachments

        Activity

          People

            andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 43 weeks, 1 day ago