pub struct CompactTrigger {
pub tail_objects: usize,
pub tail_bytes: u64,
pub tail_age: Option<Duration>,
}Expand description
When the WAL tail is long enough that it should be folded into a segment.
A query reads every tail object, one GET each, so the count is latency and
the bytes are the read budget. Any trigger that is crossed makes a
compaction due, as long as the tail is not empty. Turn one off with
usize::MAX, u64::MAX or None. Zero means “any tail at all”.
Fields§
§tail_objects: usizeDue once the tail has this many objects. Default
DEFAULT_TAIL_OBJECTS.
tail_bytes: u64Due once the tail is this many stored bytes. Default
DEFAULT_TAIL_BYTES.
tail_age: Option<Duration>Due once the oldest tail object is this old. Off by default, since a
namespace with a slow trickle of writes would otherwise be merged over
and over, and a merge rewrites every segment. It is what makes
a small, slow namespace fold at all, and only folded objects can be
fenced by gc. The age is the store’s write
time against this machine’s clock.
Trait Implementations§
Source§impl Clone for CompactTrigger
impl Clone for CompactTrigger
impl Copy for CompactTrigger
Source§impl Debug for CompactTrigger
impl Debug for CompactTrigger
Source§impl Default for CompactTrigger
impl Default for CompactTrigger
impl Eq for CompactTrigger
Source§impl PartialEq for CompactTrigger
impl PartialEq for CompactTrigger
impl StructuralPartialEq for CompactTrigger
Auto Trait Implementations§
impl Forget for CompactTrigger
impl Freeze for CompactTrigger
impl Move for CompactTrigger
impl RefUnwindSafe for CompactTrigger
impl Send for CompactTrigger
impl Sync for CompactTrigger
impl Unpin for CompactTrigger
impl UnsafeUnpin for CompactTrigger
impl UnwindSafe for CompactTrigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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