pub struct RecoveryReport {
pub pages_scanned: u64,
pub leaves_kept: u64,
pub leaves_lost: u64,
pub entries_recovered: u64,
pub lost_ranges: Vec<LostLeaf>,
pub truncated_tail_bytes: u64,
pub wal_quarantined: Option<PathBuf>,
pub wal_bytes_kept: u64,
pub wal_bytes_set_aside: u64,
}Fields§
§pages_scanned: u64Total page reads attempted, across BOTH sweeps – the first (which collects entries and losses) and the second (which walks the sibling chain to name each loss). Reflects actual I/O cost, not distinct pages in the file; a store with any losses is read twice.
leaves_kept: u64§leaves_lost: u64§entries_recovered: u64Entries actually present in the rebuilt tree – after deduplication, so
this is exactly what a caller’s scan will count, never a raw sum of
pushes into leaves that may have overlapped.
lost_ranges: Vec<LostLeaf>One entry per lost leaf. See LostLeaf.
truncated_tail_bytes: u64Bytes at the end of the file that do not make up a complete page
(file length not a multiple of PAGE_SIZE) – e.g. a crash mid-extend,
or a full disk. Named, not classified: the page’s own kind is
unknowable, because its header may be exactly the part that is
missing. NOT included in leaves_lost – a page that was never even a
candidate to be a leaf is not a leaf loss, it is a separate, honestly
unclassifiable fact about the file.
wal_quarantined: Option<PathBuf>Where the write-ahead log was copied to, if it held damage Wal::open
refuses to walk past (wal::Stop::Damaged). Every original byte is in
that file; the live wal is reconstructed from independently verified
committed regions. None means the log was fine and was not
touched at all – the ordinary case, and the one this module’s doc
comment promises.
wal_bytes_kept: u64Bytes in the reconstructed live log. Ambiguous regions remain in the quarantined original for a repair tool or person to inspect.
wal_bytes_set_aside: u64Size of the log that was set aside, in full.