Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5928

Non-atomic upsert

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.0.5
    • Write Ops
    • None

    Description

      I was under impression, that update w/upsert is atomic (since it operates on a single, though maybe not-yet-existing document). Unfortunately, when under moderate load we see duplicate key errors on id for upsert operations. I've read the docs and got the impression that $atomic modifier is not a solution (docs describe it as a way to do _multiple document updates concurrently). Is there something broken in the server, documentation or my own head? =) If it's a documentation issue (I suspect that, but I feel sorry for myself updating all our code that uses upserts), please update the docs with a clear statement that "upsert still can fail on non-unique IDs, use XXX instead".

      Attachments

        Activity

          People

            tyler@10gen.com Tyler Brock
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: