pub struct WalConfig {
pub dir: PathBuf,
pub group_commit_window: Duration,
pub max_batch_size: usize,
pub max_pending_writes: usize,
pub preallocate_size: u64,
pub direct_io: bool,
pub sync_mode: SyncMode,
pub max_file_size: u64,
pub encryptor: Option<Arc<dyn Encryptor>>,
}Expand description
Configuration for group commit WAL
Fields§
§dir: PathBufDirectory for WAL files
group_commit_window: DurationGroup commit window (how long to wait for more writes)
max_batch_size: usizeMaximum batch size before forcing flush
max_pending_writes: usizeMaximum pending writes before forcing flush
preallocate_size: u64Pre-allocate WAL files to this size
direct_io: boolEnable direct I/O (bypass OS cache)
sync_mode: SyncModeSync mode
max_file_size: u64Maximum WAL file size before rotation
encryptor: Option<Arc<dyn Encryptor>>Optional encryption for data at rest
Implementations§
Source§impl WalConfig
impl WalConfig
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
High-throughput configuration (more batching, less frequent sync)
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Low-latency configuration (less batching, more frequent sync)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalConfig
impl !RefUnwindSafe for WalConfig
impl Send for WalConfig
impl Sync for WalConfig
impl Unpin for WalConfig
impl !UnwindSafe for WalConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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