Skip to main content

GcResponse

Struct GcResponse 

Source
pub struct GcResponse {
    pub namespace_id: NamespaceId,
    pub deleted: DeletedObjectCounts,
    pub released_checkpoints: ReleasedCheckpointCounts,
    pub retained_candidates: u64,
    pub retained: RetainedCandidates,
    pub retention_degraded: bool,
    pub content_reclamation_deferred: bool,
    pub budget_exhausted: bool,
    pub next_cursor: Option<String>,
    pub next_reclamation_at_ms: Option<u64>,
}
Expand description

Result of one mark-and-sweep garbage-collection pass.

Deletion counts are grouped by object family. Checkpoint releases and retained candidates are grouped by reason.

Fields§

§namespace_id: NamespaceId

Namespace the pass ran against.

§deleted: DeletedObjectCounts

Objects the pass deleted, split by object family.

§released_checkpoints: ReleasedCheckpointCounts

Checkpoint records the pass released, split by the reason each one was released.

§retained_candidates: u64

Candidates retained at delete time (grace window, missing timestamps, or reachable from the fresh root set).

§retained: RetainedCandidates

retained_candidates grouped by reason.

§retention_degraded: bool

True when ambiguous roots suppressed manifest/segment deletion.

§content_reclamation_deferred: bool

True when max_objects was too small to build the complete reference set required for completed-content reclamation.

§budget_exhausted: bool

True when the pass reached max_objects before it finished. Use next_cursor to continue or run again with a larger limit.

§next_cursor: Option<String>

Opaque resume token when more candidates remain. It is valid only for the same namespace.

§next_reclamation_at_ms: Option<u64>

Earliest known time when a retained upload session may become reclaimable. This covers open-session leases and grace periods for aborted or completed sessions. It only reflects candidates inspected by this pass, so absence does not mean no future work remains.

Implementations§

Source§

impl GcResponse

Source

pub fn empty(namespace_id: NamespaceId) -> Self

An empty report for namespace_id, before any candidate is examined.

Source

pub fn retain(&mut self, reason: RetainedReason)

Records one retained candidate under the reason that spared it.

The total and the breakdown move together here so they cannot drift: every sweep site names a reason, and no site can count a retention without naming one.

Trait Implementations§

Source§

impl Clone for GcResponse

Source§

fn clone(&self) -> GcResponse

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 GcResponse

Source§

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

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

impl<'de> Deserialize<'de> for GcResponse

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 GcResponse

Source§

impl PartialEq for GcResponse

Source§

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

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 GcResponse

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 = !

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.