pub struct CompactionConfig {
pub target_segment_size: usize,
pub min_segment_size: usize,
pub max_merge_segments: usize,
pub garbage_threshold: f32,
pub auto_compact: bool,
pub compaction_interval_secs: u64,
pub max_concurrent_jobs: usize,
pub tombstone_ttl_secs: u64,
}Expand description
Configuration for compaction operations
Fields§
§target_segment_size: usizeTarget segment size (number of vectors)
min_segment_size: usizeMinimum segment size before considering for merge
max_merge_segments: usizeMaximum segments to merge in one operation
garbage_threshold: f32Garbage ratio threshold to trigger compaction (0.0 - 1.0)
auto_compact: boolEnable automatic background compaction
compaction_interval_secs: u64Interval between compaction checks (seconds)
max_concurrent_jobs: usizeMaximum concurrent compaction jobs
tombstone_ttl_secs: u64Preserve tombstones for this duration (seconds) for consistency
Implementations§
Source§impl CompactionConfig
impl CompactionConfig
Sourcepub fn with_target_size(self, size: usize) -> Self
pub fn with_target_size(self, size: usize) -> Self
Set target segment size
Sourcepub fn with_min_size(self, size: usize) -> Self
pub fn with_min_size(self, size: usize) -> Self
Set minimum segment size
Sourcepub fn with_garbage_threshold(self, threshold: f32) -> Self
pub fn with_garbage_threshold(self, threshold: f32) -> Self
Set garbage threshold
Sourcepub fn without_auto_compact(self) -> Self
pub fn without_auto_compact(self) -> Self
Disable automatic compaction
Sourcepub fn with_interval(self, secs: u64) -> Self
pub fn with_interval(self, secs: u64) -> Self
Set compaction interval
Trait Implementations§
Source§impl Clone for CompactionConfig
impl Clone for CompactionConfig
Source§fn clone(&self) -> CompactionConfig
fn clone(&self) -> CompactionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompactionConfig
impl Debug for CompactionConfig
Auto Trait Implementations§
impl Freeze for CompactionConfig
impl RefUnwindSafe for CompactionConfig
impl Send for CompactionConfig
impl Sync for CompactionConfig
impl Unpin for CompactionConfig
impl UnsafeUnpin for CompactionConfig
impl UnwindSafe for CompactionConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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