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

Retry full upsert path when duplicate key exception matches exact query predicate

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.6
    • Component/s: Write Ops
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2018-11-05, Query 2018-11-19, Query 2018-12-03
    • Linked BF Score:
      95

      Description

      Subset of cases described in SERVER-14322 that can be safely retried as an upsert is when insert portion of update receives a duplicate key exception with duplicate key-values combination matching the query exactly.

      Example:

      db.foo.update({_id:5},{$set:{...}\},{upsert:true})

      can safely retry full upsert if it receives error

      "E11000 duplicate key error collection: bar.foo index: id dup key: { : 5.0 }"

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: