Skip to main content

MetadataReport

Struct MetadataReport 

Source
#[non_exhaustive]
pub struct MetadataReport {
Show 16 fields pub clean_close: bool, pub stale_pages: Vec<u32>, pub lost_pages: Vec<u32>, pub volume_stale: bool, pub healed: Option<Healed>, pub frozen: bool, pub read_only_reason: Option<&'static str>, pub retried_reads: u32, pub damaged_slots: Vec<DamagedSlot>, pub invalid_entries: Vec<(u32, u32)>, pub extra_extents: Vec<(RegionId, (u64, u64))>, pub superseded: Vec<RegionId>, pub shares_reserved: Vec<RegionId>, pub stale_page_agreement: Vec<(u32, bool)>, pub lost_header_writes: Vec<RegionId>, pub truncated: bool,
}
Expand description

What a format-2 open found in its metadata pairs (the volume record and the table pages).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§clean_close: bool

The last writer closed cleanly: its final volume record is intact and says so (a damaged or in-flight volume record voids it).

§stale_pages: Vec<u32>

Pages whose newest copy is damaged (Unconfirmed): their regions are read-only and allocation is frozen.

§lost_pages: Vec<u32>

Pages with no usable copy (Lost), or whose copy fails the page checks: their regions are unknown and allocation is frozen.

§volume_stale: bool

The volume record’s newest copy was damaged (a writable open replaces it).

§healed: Option<Healed>

The one metadata write a crash left torn, which this open rewrote.

§frozen: bool

Allocation is frozen: some page is stale or lost (as the open found it; now: Store::frozen).

§read_only_reason: Option<&'static str>

Why a writable open was made read-only, if it was.

§retried_reads: u32

Metadata pairs read a second time because a slot read failed (each failed read is retried once).

§damaged_slots: Vec<DamagedSlot>

Every candidate and every damaged slot of the volume record and the table pages (spec §9), in pair order, slot A first. A lost pair’s slots are all damage; a page whose winner fails the page checks counts its winner as damage too.

§invalid_entries: Vec<(u32, u32)>

Table entries whose kind or name do not decode, as (page, seq): unavailable, their spans reserved (the regions with a readable name are in StoreReport::unavailable).

§extra_extents: Vec<(RegionId, (u64, u64))>

Extents a region header lists past its entry’s count (a growth beyond capacity cut short): not part of the region; allocated while the region’s page is stale.

§superseded: Vec<RegionId>

Regions that may read another region’s bytes (spec §9 step 4): an unavailable region with a newer footprint overlaps them. Read-only.

§shares_reserved: Vec<RegionId>

Regions an unavailable region’s span overlaps (those bytes stay reserved).

§stale_page_agreement: Vec<(u32, bool)>

For each stale page, whether every region header on it agrees with its entry. Agreement does not prove nothing was lost (spec §9): a growth within capacity changes only the entry, and a lost release can leave a Ready header over reused space.

§lost_header_writes: Vec<RegionId>

Regions whose header pair shows a newer, unreadable version than the one the open uses (spec §8): a recycle, slot commit or growth’s header possibly lost to a crash. The older version is served. After a clean close also a pair whose other copy was written and no longer verifies, unless it is provably the served version’s predecessor (D-162): damage since, or a torn write an earlier crash left that no later write of the pair replaced (listed until the region’s next header write). Either way the served version may not be the newest written (a slot’s last commit); a damaged older copy whose header CRC cannot be read is listed too.

§truncated: bool

A list above was cut at its limit (256 items).

Trait Implementations§

Source§

impl Clone for MetadataReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetadataReport

Source§

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

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

impl Default for MetadataReport

Source§

fn default() -> Self

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

impl Display for MetadataReport

Source§

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

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

impl Eq for MetadataReport

Source§

impl PartialEq for MetadataReport

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MetadataReport

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.