*wt_cache_page_read() is only called from *wt_cache_read(), based on a value returned from __wt_page_inmem().
Why not change *wt_page_inmem() to call *wt_cache_page_read() directly, and remove its inmem_size argument?
I think it's simpler code and trivially more correct (we'll include the root page in our cache memory calculations).
My only concern is that we depend in some way on not including the root page in our memory calculations, or salvage pages (salvage also calls __wt_page_inmem()). It looks safe, but I'm not 100% sure.
- is related to
-
WT-117 Run example programs as part of automated testing
- Closed