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

RecordId might be inserted more than once with unique index and dupsAllowed == true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-rc6
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      Here's a bug: https://github.com/mongodb/mongo/blob/3c1347b07d678297aa1d136e780f461bf1e28c07/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp#L1037

      If there are two RecordIds (locInIndex) that are higher than RecordId we're inserting (loc), then the loc will be inserted more than once to the value.

      I believe this line should be

      if (!insertedLoc && loc < locInIndex)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              igor Igor Canadi
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: