package granary
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8b18780ea373be48301d9f333925860a2f9110fc0ac28684295118d72b65a67e
sha512=25ca3c9c5e2b528704a542502e0f37dc33ba003f65622d969b8c2b800778585f8ef0cf89b36e6679832e3993e8303aecddfc662742baf7044d6afe4a796b8f11
doc/granary.storage/Granary_storage/Pager_event/index.html
Module Granary_storage.Pager_eventSource
type t = | Page_read of {}(*main-file backend read — pager cache MISS only; WAL-served reads emit
*)Wal_readinstead| Wal_read of {}(*WAL-overlay backend read (#392) — pager cache MISS resolved from a WAL frame rather than the main file
*)| Page_write of {}(*page written to WAL/main on flush
*)| Page_alloc of {}| Page_free of {}(*page pushed to the freelist / txn pool
*)
Page-level signal emitted by Granary_storage.Pager for the internals monitor (#384). Storage-local on purpose: Store_event lives a layer up in granary.store, which depends on this library, so the pager cannot reference it without creating a dependency cycle. Store.set_event_callback translates these into Store_event.t variants.
Emitted on a pager-level backend resolution (the pager's own page cache missed): Page_read fires when the page is served from the MAIN FILE, Wal_read (#392) when it is served from the WAL overlay. Neither fires on a pager cache hit. Like Page_read, Wal_read fires per pager-level resolution regardless of any cache internal to the WAL layer (its frame cache), mirroring how Page_read fires regardless of the OS/block-device cache under read_page. Page_write fires once per dirty page handed to the WAL/main on flush.
Pretty-print a page event (e.g. PAGE_ALLOC page=9 reused=true).