Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5250

Stop relying on all entries for a given page being contiguous in the lookaside table

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage Engines 2019-12-02

      On a lookaside eviction, we store the min and max keys that we're writing to lookaside so that we can easily instantiate the page in the future. At the moment, we simply begin at the min key and call next on the cursor until we go past the max key, which relies in the lookaside keys being in the same order as the btree that the keys come from. This assumption isn't true as we've discovered a quirk with putting strings keys into a byte array type (which we have to do in the lookaside table since the key can be any type) where it is encoded with the length prefixed to it. This means that string keys aren't in alphabetical order (they are in length order and THEN alphabetical order).

      The solution is to store every key that we're writing to lookaside when evicting. That way we can simply search for each one to instantiate the page as needed.

            Assignee:
            alex.cameron@mongodb.com Alex Cameron (Inactive)
            Reporter:
            alex.cameron@mongodb.com Alex Cameron (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: