Skip to main content

CleanupAction

Enum CleanupAction 

Source
#[non_exhaustive]
pub enum CleanupAction { RepairArchiveIndex { file_name: String, retired_file_names: Vec<String>, reason: String, bytes: u64, }, PruneJournal { lines: usize, parser_ignored: usize, missing_segments: usize, unreadable_revisions: usize, beyond_retention: usize, }, UpgradeManifest, RemoveCheckpoints { names: Vec<String>, expired: usize, unreferenced: usize, }, RemoveReclaimableArchive { file_name: String, segments: usize, bytes: u64, }, RewriteArchive { file_name: String, replacement_name: String, segments: usize, eligible_bytes: u64, }, RemoveStaleArchive { file_name: String, reason: StaleArchiveReason, bytes: u64, }, RemoveTemporary { file_name: String, bytes: u64, }, RemoveRecoveryBackup { file_name: String, bytes: u64, }, }
Expand description

One concrete, deterministically ordered cleanup action.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

RepairArchiveIndex

Rebuild the index of an active archive that has none.

Reported by the read-only preview, which cannot do more than name the work: the repair itself happens under the repository lock, and every index-dependent decision — the segment sweep, checkpoint removal — can only be planned once it has. The authoritative plan the CLI re-confirms is therefore always larger than the preview that named this.

Fields

§file_name: String

Archive file name the rebuilt archive is installed under: the lowest non-empty generation letter of its number.

§retired_file_names: Vec<String>

Other generation letters of the same number, whose contents are merged into the rebuild and which are then retired to .bak names. Named because confirmation is scoped to the files a plan printed, and these leave the archive namespace.

§reason: String

Why the existing index was rejected.

§bytes: u64

Whole-file bytes across every letter that will be read, which is what ends up retained under .bak names.

§

PruneJournal

Rewrite the journal while retaining readable record lines verbatim.

Fields

§lines: usize

Total physical lines removed.

§parser_ignored: usize

Lines the tolerant reader already skips.

§missing_segments: usize

Syntactic record lines whose head segment is absent.

§unreadable_revisions: usize

Non-current historical node roots that do not fully traverse.

§beyond_retention: usize

Resolvable revisions older than an explicit retention bound.

§

UpgradeManifest

Atomically raise store.version from 1 to 2 before writing v2 data.

§

RemoveCheckpoints

Remove checkpoints in one head update.

Fields

§names: Vec<String>

Exact checkpoint names, sorted and deduplicated.

§expired: usize

Names selected because their valid timestamp has expired.

§unreferenced: usize

Additional names selected by the opt-in /:async rule.

§

RemoveReclaimableArchive

Unlink a fully reclaimable active archive.

Fields

§file_name: String

Current archive file name.

§segments: usize

Segments made unavailable by the unlink.

§bytes: u64

Current whole-file bytes.

§

RewriteArchive

Rewrite an active archive to its next letter with only survivors.

Fields

§file_name: String

Source archive file name.

§replacement_name: String

Exclusively created replacement name.

§segments: usize

Segments omitted from the replacement.

§eligible_bytes: u64

TAR-entry bytes eligible for reclamation.

§

RemoveStaleArchive

Remove an inactive archive generation or empty incomplete archive.

Fields

§file_name: String

Exact archive file name.

§reason: StaleArchiveReason

Proof supporting removal.

§bytes: u64

Current whole-file bytes.

§

RemoveTemporary

Remove a provably redundant interrupted-operation staging file.

Fields

§file_name: String

Exact file name.

§bytes: u64

Current whole-file bytes.

§

RemoveRecoveryBackup

Remove an explicitly authorized old recovery backup.

Fields

§file_name: String

Exact file name.

§bytes: u64

Current whole-file bytes.

Trait Implementations§

Source§

impl Clone for CleanupAction

Source§

fn clone(&self) -> CleanupAction

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 CleanupAction

Source§

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

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

impl Eq for CleanupAction

Source§

impl PartialEq for CleanupAction

Source§

fn eq(&self, other: &CleanupAction) -> 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 CleanupAction

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.