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

upsert does not handle DuplicateKey retry correctly

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.0.0
    • Component/s: None
    • None
    • Query Execution
    • Minor Change
    • ALL
    • v8.0

      When write_ops_exec::shouldRetryDuplicateKeyException() returns true, we retry findAndModify on DuplicateKey. I think the assumption is that the document didn't exist before the command starts. However, this assumption is false when the unique index is partial.

            Assignee:
            evan.bergeron@mongodb.com Evan Bergeron
            Reporter:
            wei.hu@mongodb.com Wei Hu
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: