pub struct NoWal;Expand description
A pager without a WAL may only publish pages whose LSN is zero.
Trait Implementations§
Source§impl WalBarrier for NoWal
impl WalBarrier for NoWal
fn flush_until(&self, _lsn: u64) -> Result<()>
Source§fn validate_page_lsn(&self, lsn: u64, checkpoint_lsn: u64) -> Result<()>
fn validate_page_lsn(&self, lsn: u64, checkpoint_lsn: u64) -> Result<()>
A cold page must not claim changes beyond the host’s durable WAL.
LSN zero and the completed physical checkpoint need no live WAL handle.
Source§fn needs_page_image(&self, _page_id: u32) -> Result<bool>
fn needs_page_image(&self, _page_id: u32) -> Result<bool>
A checkpoint host can preserve the first image of an existing page
before the cache accepts an overwrite. Newly reserved pages need no undo.
Source§fn capture_page_image(&self, _page: &Page) -> Result<()>
fn capture_page_image(&self, _page: &Page) -> Result<()>
Must make the image durable before returning. The pager may evict the
replacement immediately; recording only at flush time is too late.
Source§fn reserve_pages(&self, _start: u32, _count: u32) -> Result<()>
fn reserve_pages(&self, _start: u32, _count: u32) -> Result<()>
Called before pages are removed from allocator ownership. A host may
only queue the record here:
flush_page_ownership is its durability
point.Source§fn flush_page_ownership(&self) -> Result<()>
fn flush_page_ownership(&self) -> Result<()>
Called before any page image or allocator state reaches the file. Must
make every reservation and captured page image recorded so far durable
or return an error, so a page is never written, and the header never
names it, ahead of the record that lets recovery undo it.
Source§fn detach_free_pages(&self, _pages: &[u32]) -> Result<()>
fn detach_free_pages(&self, _pages: &[u32]) -> Result<()>
Called before a persisted free-list trunk is detached from its head.
Source§fn has_page_ownership_journal(&self) -> Result<bool>
fn has_page_ownership_journal(&self) -> Result<bool>
True only while detached free IDs have durable recovery ownership.
No-op callbacks must not authorize moving a whole trunk into RAM.
Source§fn retire_pages(&self, _pages: &[u32]) -> Result<()>
fn retire_pages(&self, _pages: &[u32]) -> Result<()>
Called before retired pages enter the free list.
Source§fn retire_deferred_page(&self, page_id: u32) -> Result<()>
fn retire_deferred_page(&self, page_id: u32) -> Result<()>
Called for a page freed while reclamation is deferred. Recovery acts
on a retirement only once its generation is published, and nothing is
published before
flush_page_ownership. So until
generation_published a host may only queue this record; from then on
it must be durable before returning, or a crash leaves the page owned
by nobody.Source§fn generation_published(&self)
fn generation_published(&self)
Called before the manifest reference of a new generation is written.
Source§fn unpublished_reservation(&self, _page_id: u32) -> bool
fn unpublished_reservation(&self, _page_id: u32) -> bool
Whether
page_id was reserved for a generation that is not published.
Nothing reads such a page until sync and the manifest make it part
of the database, and recovery releases it whatever it holds: a torn
home write of it harms nobody, so it needs no double-write frame.Source§fn unpublished_overwrite(&self, _page_id: u32) -> bool
fn unpublished_overwrite(&self, _page_id: u32) -> bool
Whether the first image of
page_id was captured, durably, for a
generation that is not published. Recovery puts every such image back
before it follows a root, and a generation is synced before its
manifest names it: a torn home write of the page’s replacement is
undone or was never torn, so it needs no double-write frame either.Auto Trait Implementations§
impl Forget for NoWal
impl Freeze for NoWal
impl Move for NoWal
impl RefUnwindSafe for NoWal
impl Send for NoWal
impl Sync for NoWal
impl Unpin for NoWal
impl UnsafeUnpin for NoWal
impl UnwindSafe for NoWal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more