pub struct Config { /* private fields */ }Expand description
Global keyspace configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn manual_journal_persist(self, flag: bool) -> Self
pub fn manual_journal_persist(self, flag: bool) -> Self
If false, write batches or transactions automatically flush data to the operating system.
Default = false
Set to true to handle persistence manually, e.g. manually using PersistMode::SyncData for ACID transactions.
Sourcepub fn flush_workers(self, n: usize) -> Self
pub fn flush_workers(self, n: usize) -> Self
Sets the amount of flush workers
Default = # CPU cores
Sourcepub fn compaction_workers(self, n: usize) -> Self
pub fn compaction_workers(self, n: usize) -> Self
Sets the amount of compaction workers
Default = # CPU cores
Sourcepub fn max_open_files(self, n: usize) -> Self
pub fn max_open_files(self, n: usize) -> Self
Sourcepub fn block_cache(self, block_cache: Arc<BlockCache>) -> Self
pub fn block_cache(self, block_cache: Arc<BlockCache>) -> Self
Sets the block cache.
Defaults to a block cache with 16 MiB of capacity shared between all partitions inside this keyspace.
Sourcepub fn blob_cache(self, blob_cache: Arc<BlobCache>) -> Self
pub fn blob_cache(self, blob_cache: Arc<BlobCache>) -> Self
Sets the blob cache.
Defaults to a block cache with 16 MiB of capacity shared between all partitions inside this keyspace.
Sourcepub fn max_journaling_size(self, bytes: u64) -> Self
pub fn max_journaling_size(self, bytes: u64) -> Self
Max size of all journals in bytes.
Default = 512 MiB
§Panics
Panics if bytes < 24 MiB.
This option should be at least 24 MiB, as one journal takes up at least 16 MiB, so anything less will immediately stall the system.
Same as max_total_wal_size in RocksDB.
Sourcepub fn max_write_buffer_size(self, bytes: u64) -> Self
pub fn max_write_buffer_size(self, bytes: u64) -> Self
Max size of all memtables in bytes.
Similar to db_write_buffer_size in RocksDB, however it is disabled by default in RocksDB.
Set to u64::MAX to disable it.
Default = 64 MiB
§Panics
Panics if bytes < 1 MiB.
Sourcepub fn fsync_ms(self, ms: Option<u16>) -> Self
pub fn fsync_ms(self, ms: Option<u16>) -> Self
If Some, starts an fsync thread that asynchronously persists data to disk (using fsync).
Default = off
§Panics
Panics if ms is 0.