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

Use cursor_row_search on bounded next/prev impl

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0, WT11.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5
    • Storage Engines - 2022-07-11

      Currently when we call prev() with an upper_bound, we call a search_near() to position the cursor to the nearest visible record. This implementation is not optimised through the edge case where we have no visible record previous to the upper bound and there are no visible records after the upper bound. In this case search_near_neighbouring does a next loop() til it goes out of bounds, thus "walking til the end of the key range". Afterwards we start from the end of the tree and walk backwards to find the visible record before the search key, note we don't search near here because we have a BOUND_ENTRY_FLAG set. This means we will be walking from the end of the tree instead of starting from the end of the key range. This performance optimisation can be improved.

      Acceptance Criteria (Definition of Done)
      This ticket will be marked as done, once the performance is improved and search only traverses in between key ranges.

            jie.chen@mongodb.com Jie Chen
            jie.chen@mongodb.com Jie Chen
            0 Vote for this issue
            1 Start watching this issue