Refactor __wt_cursor_valid.

XMLWordPrintableJSON

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

      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
              Reporter:
              Luke Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: