-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Cache and Eviction, Statistics
-
None
-
Storage Engines - Transactions
-
72.933
-
SE Transactions - 2026-10-23
-
3
__btree_preload() reads all of the pages referenced from a btree's root page as a way to prewarm those pages.
But it doesn't read the pages into the WT cache. It reads them into a temporary buffer, which is discarded after the preload. As a result, it is warming the pages into the kernel page cache rather than WT's cache.
This tickles a bug in WT's cache statistics, as these pages get counted in the "pages read into cache" statistic, even though they never land in the cache.
The problem is that this statistic is incremented in __wt_blkcache_read(), which the preload reads go through. We should probably move that statistic (and related ones) to __wt_page_in(), which is where we actually load pages into the cache. This would be symetric with incrementing the "pages requested from cache" statistic in that function.
If we do that, we should also check whether there are other paths that call __wt_blkcache_read() and ultimately load a page into the cache without going through __wt_page_in().