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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.15, 4.3.1, 4.2.2, 4.0.14
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0, v3.6
    • Execution Team 2019-10-21
    • 50

      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.

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

              Created:
              Updated:
              Resolved: