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

upsert does not handle DuplicateKey retry correctly

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.0.0
    • Component/s: None
    • None
    • Query Execution
    • ALL

      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:
            18 Start watching this issue

              Created:
              Updated: