pub struct PruneOptions {
pub grace: Duration,
pub dry_run: bool,
}Expand description
How S3Cleaner::prune_with decides what nothing reads any more.
Cleaner::prune takes everything the newest version does not point into,
less what a compaction attached to it points into (and refuses, deleting
nothing, where the inode says one is attached and its metadata does not
read). A reader that opened an older version, or a plan made under one and
fetched outside the handle, reads objects the newest version no longer points
at, and a compaction beside the writer writes copies nothing points at until
it attaches them. grace keeps both:
- every object that a version current at any time in the last
gracepoints into: each checkpoint published in it, and the version current when it began; - every object written in the last
grace.
So grace has to be longer than any reader holds a version, and a
compaction’s max_age shorter than grace. Times are the store’s. Nothing
above the newest published number is taken either way: the writer’s next
checkpoint is being written there.
Fields§
§grace: DurationHow long a version is kept after it stops being the newest, and an object
after it is written. Zero is Cleaner::prune.
dry_run: boolDecide and report, delete nothing.
Trait Implementations§
Source§impl Clone for PruneOptions
impl Clone for PruneOptions
Source§impl Debug for PruneOptions
impl Debug for PruneOptions
Auto Trait Implementations§
impl Freeze for PruneOptions
impl RefUnwindSafe for PruneOptions
impl Send for PruneOptions
impl Sync for PruneOptions
impl Unpin for PruneOptions
impl UnsafeUnpin for PruneOptions
impl UnwindSafe for PruneOptions
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