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

Modify IndexConsistency hash-map keys to avoid hitting an invariant on duplicate index keys in KeyString form for different indexes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.15, 4.3.1, 4.2.2, 4.0.14
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0, v3.6
    • Sprint:
      Execution Team 2019-10-21
    • Linked BF Score:
      50

      Description

      It's possible to hit this invariant as index key KeyStrings are created without their field names present in the KeyStrings.

      For example, if we had the following document:

      { a: 1, b: 1 }

      and two indexes on keys "a" and "b", then the KeyStrings for the index keys of the document would be identical as the field name in the KeyString is not present. The BSON representation of this would look like: { : 1 } for both.

      So to distinguish index key KeyStrings, we should append the index name to the end of them.

        Attachments

          Activity

            People

            Assignee:
            gregory.wlodarek Gregory Wlodarek
            Reporter:
            gregory.wlodarek Gregory Wlodarek
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: