pub struct CompactionConfig {
pub enabled: bool,
pub max_l1_runs: usize,
pub max_l1_size_bytes: u64,
pub max_l1_age: Duration,
pub check_interval: Duration,
pub worker_threads: usize,
pub frozen_segments_compact_threshold: usize,
}Fields§
§enabled: boolEnable background compaction (default: true)
max_l1_runs: usizeMax uncompacted flush generations before triggering compaction (default: 8)
max_l1_size_bytes: u64Max L1 size in bytes before compaction (default: 256MB)
max_l1_age: DurationMax age of oldest L1 run before compaction (default: 1 hour)
check_interval: DurationBackground check interval (default: 10s)
worker_threads: usizeNumber of compaction worker threads (default: 1)
frozen_segments_compact_threshold: usizeNumber of frozen L0-csr overlay segments that must accumulate before
AdjacencyManager::compact is spawned post-flush (default: 2).
Each frozen segment adds per-read overhead until merged back into the Main CSR. Lowering this triggers compaction sooner; higher values batch more segments per compaction at the cost of slower reads while they accumulate. The default of 2 keeps the read-side overhead bounded across a wide range of write rates. See issue #55.
Trait Implementations§
Source§impl Clone for CompactionConfig
impl Clone for CompactionConfig
Source§fn clone(&self) -> CompactionConfig
fn clone(&self) -> CompactionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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