-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
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.