-
Type:
Technical Debt
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: Block Cache
-
None
-
Storage Engines, Storage Engines - Persistence
-
0.001
-
SE Persistence backlog
-
None
Issue Summary
__evict_page_victim_cache in src/evict/evict_page.c starts with a long chain of early-return eligibility checks (disaggregated btree, block manager, block_disagg, page log handle, cache availability, modified state, leaf/disagg/disk-image requirements, valid page id, root page, cold storage tier) before the actual compress/checksum/put work begins. Mixing eligibility checks with the I/O-heavy put path makes the function harder to read.
Context
* Affected file: src/evict/evict_page.c, function __evict_page_victim_cache
* Pure code-cleanup refactor, no behavior change intended
Proposed Solution
* Extract the early-exit eligibility checks into a new static helper, e.g. __evict_page_victim_cache_eligible, returning bool
* Pass out the page log handle (WT_PAGE_LOG_HANDLE *) needed later in the put path via an out-parameter
* __evict_page_victim_cache calls the helper and returns early if ineligible, then proceeds with the existing compress/checksum/put logic unchanged
Definition of Done
* Helper function extracted and wired in, no behavior change
* dist/s_all passes (style/format)
* Build succeeds with no new warnings