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

Optimize seekExact for WiredTiger

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None

      Currently, WiredTigerIndex::seekExact converts the KeyString passed in into BSON and then converts it to KeyString again with a discriminator byte. This is related to how we store RecordId at the end of KeyString and use WT's search_near() and then selectively call prev()/next() on the cursor. In the reverse cursor way, we want to append a kExclusiveAfter so that it can land on the exact match.

      This is certainly unideal, as we have to do two extra conversions just for appending a discriminator when it's a reverse cursor. Maybe WiredTigerIndex::seekExact should use a different combinations of WT's search_near(), prev() and next() to find the match so that we don't need to append any discriminator byte. Or maybe we just need to add a helper method on KeyString that could easily append a discriminator byte to itself.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: