Struct matterdb::DBOptions [−][src]
#[non_exhaustive]pub struct DBOptions { pub max_open_files: Option<i32>, pub create_if_missing: bool, pub compression_type: CompressionType, pub max_total_wal_size: Option<u64>, }
Expand description
Options for the database.
These parameters apply to the underlying database, currently RocksDB
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.max_open_files: Option<i32>
Number of open files that can be used by the database.
The underlying database opens multiple files during operation. If your system has a limit on the number of files which can be open simultaneously, you can adjust this option to match the limit. Note, that limiting the number of simultaneously open files might slow down the speed of database operation.
Defaults to None
, meaning that the number of open files is unlimited.
create_if_missing: bool
An option to indicate whether the system should create a database or not, if it’s missing.
This option applies to the cases when a node was switched off and is on again. If the database cannot be found at the indicated path and this option is switched on, a new database will be created at that path and blocks will be included therein.
Defaults to true
.
compression_type: CompressionType
An algorithm used for database compression.
Defaults to CompressionType::None
, meaning there is no compression.
max_total_wal_size: Option<u64>
Max total size of the WAL journal in bytes.
Defaults to None
, meaning that the size of WAL journal will be adjusted
by the rocksdb.
Implementations
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for DBOptions
impl UnwindSafe for DBOptions
Blanket Implementations
Mutably borrows from an owned value. Read more