Purpose:
The goal of this ticket is to give the layered-table truncate-list search a single owner. This is to improve readability, but also make visibility filtering and future search optimisations all target one function instead of two parallel loops that can drift. This will improve maintainability in the long term.
As a side benefit, it removes the uncommon WT_RET(ret) call placed after the err: label in both functions.
Context:
WT-17187 left every function that searches the truncate list as near-identical search loops, differing only in their visibility predicate (committed vs. uncommitted) and whether they return the matched entry.
Definition of Done
- The search logic is factored out into a separate helper function