diff options
author | Alex Auvolat <alex@adnab.me> | 2022-03-15 12:31:23 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-23 10:25:19 +0100 |
commit | e480aaf338e3dfa280f0a78921c024265c811458 (patch) | |
tree | ecfa923127094b492154fa482ca3da8de64b8d90 /src/util | |
parent | 8fd6745745f5676b5e80920792fa23453f3a20d7 (diff) | |
download | garage-e480aaf338e3dfa280f0a78921c024265c811458.tar.gz garage-e480aaf338e3dfa280f0a78921c024265c811458.zip |
Make background tranquility a configurable parameter
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/config.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/config.rs b/src/util/config.rs index f74a62d0..e4d96476 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -23,6 +23,10 @@ pub struct Config { #[serde(default = "default_block_size")] pub block_size: usize, + /// Size of data blocks to save to disk + #[serde(default = "default_block_manager_background_tranquility")] + pub block_manager_background_tranquility: u32, + /// Replication mode. Supported values: /// - none, 1 -> no replication /// - 2 -> 2-way replication @@ -118,6 +122,9 @@ fn default_sled_flush_every_ms() -> u64 { fn default_block_size() -> usize { 1048576 } +fn default_block_manager_background_tranquility() -> u32 { + 2 +} /// Read and parse configuration pub fn read_config(config_file: PathBuf) -> Result<Config, Error> { |