Skip to main content

RecoveryReport

Struct RecoveryReport 

Source
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: u64

Total 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: u64

Entries 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: u64

Bytes 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: u64

Bytes in the reconstructed live log. Ambiguous regions remain in the quarantined original for a repair tool or person to inspect.

§wal_bytes_set_aside: u64

Size of the log that was set aside, in full.

Trait Implementations§

Source§

impl Debug for RecoveryReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RecoveryReport

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.