Avoid using KeyString::getKeySize() in WiredTigerIndex when possible

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • None
    • Fully Compatible
    • Execution Team 2019-10-21
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are a few calls to KeyString::getKeySize() in WiredTigerIndex such as here to determine if the KeyString has a RecordId appended. We should avoid calling this method when possible because it reconstructs the entire KeyString which is an expensive operation.

      There are a couple known cases when we know whether the RecordId is appended to the KeyString or not.

      • _id indexes: these never have the RecordId appended.
      • Non-unique indexes: they always have the RecordId appended.

            Assignee:
            Geert Bosch
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: