Skip to main content

RetainedCandidates

Struct RetainedCandidates 

Source
pub struct RetainedCandidates {
    pub referenced: u64,
    pub grace_window: u64,
    pub no_provider_timestamp: u64,
    pub degraded_roots: u64,
    pub unrecognized_key: u64,
    pub checkpoint_not_releasable: u64,
    pub upload_session_window: u64,
    pub upload_session_undecided: u64,
    pub content_scan_deferred: u64,
}
Expand description

Why a pass kept what it kept: retained_candidates split by the decision that spared each candidate.

The reasons are a closed set — one per place the sweep decides against deleting — so every field is always reported, and a zero is the answer that nothing was kept for that reason. The counts sum to retained_candidates.

Retention is a decision per candidate examined, not per object in the namespace: one object examined by two passes is counted by each.

Fields§

§referenced: u64

Selected as unreachable, then found reachable by the re-verification that runs immediately before every deletion. A candidate the pass already knew was reachable is never examined at all, so this counts the namespace moving underneath the pass rather than the size of its live set.

§grace_window: u64

Unreachable, but younger than the grace window by the object’s own provider timestamp. A later pass deletes it.

§no_provider_timestamp: u64

Unreachable, and the provider reported no last-modified time at all, so the object’s age is unknown and it is treated as young.

§degraded_roots: u64

Root resolution failed somewhere in this pass, so manifest and table deletion was suppressed wholesale (degraded_retention is set too).

§unrecognized_key: u64

A key under a swept family that this collector does not recognize as one of its own. Never deleted, whatever its age.

§checkpoint_not_releasable: u64

A checkpoint record this pass could have advanced but could not prove ready: a lost compare-and-swap, an unreadable record, a fork target not provably gone, a released record still inside its grace window, or an active pin that is simply doing its job. The pins themselves are listed by GET /v0/admin/namespaces/{ns}/checkpoints.

§upload_session_window: u64

An upload session waiting out a window a clock resolves: an open session’s lease plus the grace, an aborted session’s grace, or a completed session’s derived content-reclamation grace. next_reclamation_at_ms reports the soonest of these.

§upload_session_undecided: u64

An upload session held over for a reason no clock resolves: a lost compare-and-swap, a record that vanished mid-pass, or a reference set this pass could not establish. Only a later pass answers it.

§content_scan_deferred: u64

A completed session whose content reclamation was skipped because the reference scan did not fit in max_objects (content_reclamation_deferred is set too).

Implementations§

Source§

impl RetainedCandidates

Source

pub fn by_reason(&self) -> [(&'static str, u64); 9]

Every reason and its count, in a fixed order, for callers that report the breakdown rather than read one field of it.

Source

pub fn add(&mut self, other: &Self)

Folds another pass’s breakdown into this one.

Source

pub fn top_reason(&self) -> Option<(&'static str, u64)>

The reason with the highest count, and that count. None when nothing was retained. Ties go to the first in Self::by_reason order, so one pass’s report is stable.

Trait Implementations§

Source§

impl Clone for RetainedCandidates

Source§

fn clone(&self) -> RetainedCandidates

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 Copy for RetainedCandidates

Source§

impl Debug for RetainedCandidates

Source§

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

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

impl Default for RetainedCandidates

Source§

fn default() -> RetainedCandidates

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

impl<'de> Deserialize<'de> for RetainedCandidates

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RetainedCandidates

Source§

impl PartialEq for RetainedCandidates

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for RetainedCandidates

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RetainedCandidates

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Same for T

Source§

type Output = T

Should always be Self
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.