pub struct WalConfig {
pub fsync_policy: FsyncPolicy,
pub max_file_size: usize,
pub max_unflushed_wals: usize,
pub compress: bool,
pub group_sync_timeout_secs: u64,
}Expand description
WAL configuration.
Fields§
§fsync_policy: FsyncPolicyFsync policy: PerWrite, PerBatch, or Periodic(Duration).
max_file_size: usizeMaximum WAL file size before rotation (default: 32 MB).
max_unflushed_wals: usizeMaximum number of unflushed WAL files before backpressure (default: 4).
compress: boolEnable LZ4 compression for WAL payloads (default: true). Reduces WAL size significantly with minimal CPU cost.
group_sync_timeout_secs: u64Group-commit sync timeout in seconds (default: 30). Controls how long a waiter blocks before promoting itself to sync leader.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WalConfig
impl<'de> Deserialize<'de> for WalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for WalConfig
Auto Trait Implementations§
impl Freeze for WalConfig
impl RefUnwindSafe for WalConfig
impl Send for WalConfig
impl Sync for WalConfig
impl Unpin for WalConfig
impl UnsafeUnpin for WalConfig
impl UnwindSafe for WalConfig
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