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 attached: Option<CompactionAttached>,
pub content_version_before: Option<ContentVersion>,
pub content_version_after: Option<ContentVersion>,
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. Always none beside the
writer, whose pass keeps the number: see attached.
attached: Option<CompactionAttached>Beside the writer, what was attached: the version it was built on and the one it was attached to, the parts its objects are in, blocks moved, and how many conditional writes of the inode it took.
content_version_before: Option<ContentVersion>fs_content_version before and after the pass; None when the pass
opened nothing, a dry run. Equal when consumers will not see the pass as a
change of content, which is the ordinary case. Beside the writer they
differ when the writer published between the two, which is its own change.
content_version_after: Option<ContentVersion>§more_remaining: boolWhether the candidates outlasted the pass budget. Another pass would find more to do, and may run straight after.
dry_run: boolImplementations§
Source§impl CompactOutcome
impl CompactOutcome
Sourcepub fn content_moved(&self) -> bool
pub fn content_moved(&self) -> bool
Whether a consumer comparing the content version 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 Forget for CompactOutcome
impl Freeze for CompactOutcome
impl Move 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