add conf item to disable rocksdb compaction
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
7d487d53d8
commit
f014231644
2 changed files with 4 additions and 0 deletions
|
@ -236,6 +236,8 @@ pub struct Config {
|
|||
pub rocksdb_compaction_prio_idle: bool,
|
||||
#[serde(default = "true_fn")]
|
||||
pub rocksdb_compaction_ioprio_idle: bool,
|
||||
#[serde(default = "true_fn")]
|
||||
pub rocksdb_compaction: bool,
|
||||
|
||||
pub emergency_password: Option<String>,
|
||||
|
||||
|
@ -712,6 +714,7 @@ impl fmt::Display for Config {
|
|||
"RocksDB Compaction Idle IOPriority",
|
||||
&self.rocksdb_compaction_ioprio_idle.to_string(),
|
||||
);
|
||||
line("RocksDB Compaction enabled", &self.rocksdb_compaction.to_string());
|
||||
line("Media integrity checks on startup", &self.media_startup_check.to_string());
|
||||
line("Media compatibility filesystem links", &self.media_compat_file_link.to_string());
|
||||
line("Prevent Media Downloads From", {
|
||||
|
|
|
@ -68,6 +68,7 @@ pub(crate) fn db_options(config: &Config, env: &mut Env, row_cache: &Cache, col_
|
|||
set_compression_defaults(&mut opts, config);
|
||||
|
||||
// Misc
|
||||
opts.set_disable_auto_compactions(!config.rocksdb_compaction);
|
||||
opts.create_if_missing(true);
|
||||
|
||||
// Default: https://github.com/facebook/rocksdb/wiki/WAL-Recovery-Modes#ktoleratecorruptedtailrecords
|
||||
|
|
Loading…
Add table
Reference in a new issue