-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cache and Eviction, Statistics
-
None
-
Storage Engines - Transactions
-
210.623
-
SE Transactions - 2026-07-03
-
3
Background
feature-cross-checkpoint-caching introduced _wt_cache_inmem_incr and _wt_cache_inmem_decr to handle in-memory byte accounting for shared disk images that are not tied to a single page.
The bytes_inmem / bytes_internal / disagg ingest+stable accounting logic is currently duplicated across:
1. _wt_cache_inmem_incr ↔ _wt_cache_page_inmem_incr.
2. _wt_cache_inmem_decr ↔ wt_cache_page_inmem_decr ↔ _wt_evict_page_cache_bytes_decr.
Goal
Extract the duplicated accounting logic into a single helper (or macro) so each counter has one source of truth.
Definition of Done
1. Introduce a single helper/macro for:
bytes_inmem
bytes_internal
disagg ingest/stable counter increments and decrements.
2. Refactor the following functions to delegate to the shared helper instead of inlining the accounting logic:
__wt_cache_inmem_incr
__wt_cache_inmem_decr
__wt_cache_page_inmem_incr
__wt_cache_page_inmem_decr
__wt_evict_page_cache_bytes_decr
3. Preserve existing behavior.
- depends on
-
WT-17064 Update cache usage accounting for in memory pages
-
- Closed
-