pub struct Config {
    pub dir: String,
    pub recovery_mode: RecoveryMode,
    pub recovery_read_block_size: ReadableSize,
    pub recovery_threads: usize,
    pub batch_compression_threshold: ReadableSize,
    pub bytes_per_sync: ReadableSize,
    pub target_file_size: ReadableSize,
    pub purge_threshold: ReadableSize,
    pub purge_rewrite_threshold: Option<ReadableSize>,
    pub purge_rewrite_garbage_ratio: f64,
    pub memory_limit: Option<ReadableSize>,
}

Fields

dir: String

Directory to store log files. Will create on startup if not exists.

Default: “”

recovery_mode: RecoveryMode

How to deal with file corruption during recovery.

Default: “tolerate-tail-corruption”.

recovery_read_block_size: ReadableSize

Minimum I/O size for reading log files during recovery.

Default: “4KB”. Minimum: “512B”.

recovery_threads: usize

The number of threads used to scan and recovery log files.

Default: 4. Minimum: 1.

batch_compression_threshold: ReadableSize

Compress a log batch if its size exceeds this value. Setting it to zero disables compression.

Default: “8KB”

bytes_per_sync: ReadableSize

Incrementally sync log files after specified bytes have been written. Setting it to zero disables incremental sync.

Default: “4MB”

target_file_size: ReadableSize

Target file size for rotating log files.

Default: “128MB”

purge_threshold: ReadableSize

Purge append log queue if its size exceeds this value.

Default: “10GB”

purge_rewrite_threshold: Option<ReadableSize>

Purge rewrite log queue if its size exceeds this value.

Default: MAX(purge_threshold / 10, target_file_size)

purge_rewrite_garbage_ratio: f64

Purge rewrite log queue if its garbage ratio exceeds this value.

Default: “0.6”

memory_limit: Option<ReadableSize>

Maximum memory bytes allowed for the in-memory index. Effective under the swap feature only.

Default: None

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.