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

Fix search_near invocations for history store

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Storage Engines 2020-03-09

      We currently have some code to position our cursor at the end of a key/timestamp range in the history store.

      The implementation involves search_near running in a loop. So if we do search_near and land on the next key, we call prev to get back to the latest record for our timestamp. If we're still ahead of our key, that means we raced with another insert and we repeat this process. What should really happen is that we call prev in a loop to get to the right spot since this is much cheaper than doing a full-blown search again.

      We also have a few spots where we're using our own search_near invocation without this outer loop to guard against races. We should either generalize the cursor positioning function to work for this use case too or we should add a loop to the current invocation to make it correct.

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

              Created:
              Updated:
              Resolved: