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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.2.0
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2021-11-15, Execution Team 2021-11-29
    • 152

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: