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

Refactor __wt_cursor_valid.

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.1.0, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • 8
    • Storage Engines - 2022-11-14

      WiredTiger's cursor validity checking function has grown a lot since it was first introduced. It now is handling many different possible use cases and it's implementation has become bloated and messy. Some of the issues with it are:

      • Occasionally a key is passed.
      • Occasionally a recno is passed.
      • The CURSTD_KEY_ONLY flag is checked outside the function.
      • The logic inside cursor valid depends on early returns from the function to make sure it doesn't do the wrong thing.
      • It handles FLCS, VLCS and rowstore all at once.

      We should refactor the function to reduce its complexity and provide a significant cleanup to the btcur logic.

            Assignee:
            luke.pearson@mongodb.com Luke Pearson
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: