pub struct Recovered {
pub view: HashMap<PageId, Page>,
pub header: Option<Page>,
pub next_lsn: Lsn,
pub salt: u32,
pub committed_frames: u64,
pub end_offset: u64,
}Expand description
Result of walking an on-disk WAL during recovery.
view is the per-page-id last-committed payload, ready to be
merged into the pager’s in-memory view. next_lsn and
end_offset are the seekpoints the resulting Wal uses for
subsequent appends; salt and committed_frames carry over
from the WAL header.
header (M6 #51) carries the page-0 file-header bytes from the
most-recent committed frame whose page_id was 0. The pager
applies these on adoption so the in-memory header reflects
WAL-staged catalog-root updates that the on-disk header at offset
0 does not yet carry (until checkpoint).
Fields§
§view: HashMap<PageId, Page>Per-page-id, the body of the most-recent committed frame.
header: Option<Page>Header page-0 bytes recovered from a WAL frame with
page_id = 0, if any.
next_lsn: LsnLSN that the next WalTxn::commit will assign.
salt: u32WAL generation salt (as read from the WAL header on disk).
committed_frames: u64Number of committed frames on disk (torn-tail not counted).
end_offset: u64Byte length where the next frame will be appended. Equals the position just past the last committed frame; torn tail (if any) sits between this offset and the file length on disk.