pub struct FlushConfig {
pub flush_threshold: usize,
pub max_memory: usize,
pub stall_soft_fraction: f64,
pub max_stall_delay: Duration,
pub max_frozen_memtables: usize,
pub segment_dir: PathBuf,
pub segment_writer_config: SegmentWriterConfig,
}Expand description
Configuration for the flush controller.
Fields§
§flush_threshold: usizeMemory threshold (bytes) that triggers a flush.
max_memory: usizeMaximum total memory across active + frozen memtables.
stall_soft_fraction: f64Soft limit as a fraction of max_memory (0.0–1.0) at which
graduated write stall begins. Below this, writes proceed without delay.
Between soft limit and hard limit, writes are delayed proportionally.
Default: 0.75 (delays begin at 75% of max_memory).
max_stall_delay: DurationMaximum write stall delay applied at the hard limit boundary. Default: 100ms.
max_frozen_memtables: usizeMaximum number of frozen memtables queued for flush.
When the queue is full, freeze_and_swap rejects with CapacityExceeded.
Default: 2.
segment_dir: PathBufDirectory to write segment files.
segment_writer_config: SegmentWriterConfigConfiguration for the segment writer.
Trait Implementations§
Source§impl Clone for FlushConfig
impl Clone for FlushConfig
Source§fn clone(&self) -> FlushConfig
fn clone(&self) -> FlushConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FlushConfig
impl Debug for FlushConfig
Auto Trait Implementations§
impl Freeze for FlushConfig
impl RefUnwindSafe for FlushConfig
impl Send for FlushConfig
impl Sync for FlushConfig
impl Unpin for FlushConfig
impl UnsafeUnpin for FlushConfig
impl UnwindSafe for FlushConfig
Blanket Implementations§
impl<T> Allocation for T
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
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> ⓘ
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