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

WTUniqueIndex::_insert expects secondaries to pass in dupsAllowed=true

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2021-11-15, Execution Team 2021-11-29
    • 152

      Using dupsAllowed=false when inserting into a secondary unique index results in inserting + removing on a "prefix" document to serialize access to enforce unique constraints.

      However the preceding comment states the expectation that only primaries are executing that code path.

      This results in unnecessary writes to these prefix documents. Moreover, these writes can result in out of order update chains as secondaries can process oplog entries out of order.

            Assignee:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: