pub struct CompactionConfig {
pub enabled: bool,
pub sst_threshold: usize,
pub check_interval_secs: u64,
pub max_concurrent_compactions: usize,
}Expand description
Compaction configuration
Fields§
§enabled: boolEnable/disable automatic background compaction
sst_threshold: usizeTrigger compaction when stripe has this many SSTs
check_interval_secs: u64How often to check for compaction opportunities (in seconds)
max_concurrent_compactions: usizeMaximum number of stripes to compact concurrently
Implementations§
Source§impl CompactionConfig
impl CompactionConfig
Sourcepub fn with_sst_threshold(self, threshold: usize) -> Self
pub fn with_sst_threshold(self, threshold: usize) -> Self
Set SST threshold for triggering compaction
Sourcepub fn with_check_interval(self, seconds: u64) -> Self
pub fn with_check_interval(self, seconds: u64) -> Self
Set check interval in seconds
Sourcepub fn with_max_concurrent(self, max: usize) -> Self
pub fn with_max_concurrent(self, max: usize) -> Self
Set maximum concurrent compactions
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 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