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

Do not store the RecordId in the KeyString for unique indexes in BiggieSE

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.5
    • Affects Version/s: None
    • Component/s: Storage
    • Fully Compatible
    • ALL
    • Storage NYC 2018-10-08, Storage NYC 2018-10-22, Storage NYC 2018-11-05

      Storing the RecordId in the KeyString on unique indexes causes our namespaces to become corrupted on highly parallel workloads such as the jstest/core/bench_test3.js.

      The area of concern is when the collection is initially empty and two different threads attempt to insert the same document with the same value on a unique index. Since each thread is working in its own snapshot, it will not see the insert made by the other thread and if we use the RecordId in the KeyString, then upon merging, we will not have a conflict since both of the documents would have differing RecordIds. So for unique indexes, we shouldn't store the RecordId in the KeyString but in the value pointed to with the KeyString.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: