pub struct FlushWalOptions { /* private fields */ }Expand description
Options for DB::flush_wal_with_options.
Flushing the WAL moves buffered writes from RocksDB’s own memory into the
operating system, which is what makes them survive a process crash. It takes
an fsync on top of that, requested with set_sync, to
survive losing the machine.
Implementations§
Source§impl FlushWalOptions
impl FlushWalOptions
pub fn new() -> FlushWalOptions
Sourcepub fn set_sync(&mut self, sync: bool)
pub fn set_sync(&mut self, sync: bool)
Calls SyncWAL() after the flush, so the writes are on durable storage
rather than only handed to the operating system.
Default: false
Sourcepub fn set_rate_limiter_priority(&mut self, priority: IoPriority)
pub fn set_rate_limiter_priority(&mut self, priority: IoPriority)
Charges the IO this flush performs to the rate limiter set with
Options::set_ratelimiter at the given priority, and passes the
priority down to the file system.
IoPriority::Total disables charging the rate limiter, which is the
default.
Sourcepub fn get_rate_limiter_priority(&self) -> Option<IoPriority>
pub fn get_rate_limiter_priority(&self) -> Option<IoPriority>
Returns the value of the rate_limiter_priority option.
Returns None if RocksDB reports a priority this crate has no variant
for, which should not happen.