pub struct CompactOutcome {
pub selected: Vec<SegmentId>,
pub still_referenced: Vec<SegmentId>,
pub blocks_rewritten: usize,
pub bytes_rewritten: u64,
pub bytes_freed: u64,
pub checkpoints: usize,
pub content_cno_before: Cno,
pub content_cno_after: Cno,
pub more_remaining: bool,
pub dry_run: bool,
}Expand description
What a compaction pass did.
Fields§
§selected: Vec<SegmentId>The objects whose live blocks were rewritten, ascending.
still_referenced: Vec<SegmentId>Of those, the ones a walk taken afterwards still finds referenced. Empty on a pass that did what it set out to; anything here is an object that was not freed, and is reported rather than assumed away.
blocks_rewritten: usizeBlocks fs_relocate marked: what was done, not what was planned. A hole,
an explicit zero block or a block already dirty is not counted.
bytes_rewritten: u64§bytes_freed: u64The selected objects’ stored bytes — what prune can now reclaim.
checkpoints: usizeCheckpoints published: one for a pass that rewrote anything, none
otherwise. That is how far last_cno advanced.
content_cno_before: Cnofs_content_cno before and after the pass. Equal when consumers will not
see the pass as a change of content, which is the ordinary case. They
differ when the publish could not be marked: its number did not follow the
previous one — an earlier flush failed and gave its number up — or the
newest checkpoint was already a compaction and the pass ran anyway.
content_cno_after: Cno§more_remaining: boolWhether the candidates outlasted the pass budget. Another pass would find
more to do, at the cost of content_cno moving once (see
CompactOptions::allow_consecutive).
dry_run: boolImplementations§
Source§impl CompactOutcome
impl CompactOutcome
Sourcepub fn content_moved(&self) -> bool
pub fn content_moved(&self) -> bool
Whether a consumer comparing content_cno will see this pass as a change.
Trait Implementations§
Source§impl Clone for CompactOutcome
impl Clone for CompactOutcome
Source§impl Debug for CompactOutcome
impl Debug for CompactOutcome
Auto Trait Implementations§
impl Freeze for CompactOutcome
impl RefUnwindSafe for CompactOutcome
impl Send for CompactOutcome
impl Sync for CompactOutcome
impl Unpin for CompactOutcome
impl UnsafeUnpin for CompactOutcome
impl UnwindSafe for CompactOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more