From db6f1f35a869f9afa22198ee2ac32a812afae3c5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 30 Jun 2020 15:03:34 +0200 Subject: [PATCH] Rename epidemic_factor to epidemic_fanout (that's what it is); complete conf example in readme --- README.md | 5 +++++ src/core/garage.rs | 4 ++-- src/util/config.rs | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 615573d..04b8718 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ bootstrap_peers = [ "10.0.0.3:3901", ] +max_concurrent_rpc_requests = 12 +data_replication_factor = 3 +meta_replication_factor = 3 +meta_epidemic_fanout = 3 + [rpc_tls] # NOT RECOMMENDED: you can skip this section if you don't want to encrypt intra-cluster traffic # Thanks to genkeys.sh, generating the keys and certificates is easy, so there is NO REASON NOT TO DO IT. diff --git a/src/core/garage.rs b/src/core/garage.rs index d77b0ac..46e0d02 100644 --- a/src/core/garage.rs +++ b/src/core/garage.rs @@ -66,8 +66,8 @@ impl Garage { }; let control_rep_param = TableFullReplication::new( - config.meta_epidemic_factor, - (config.meta_epidemic_factor + 1) / 2, + config.meta_epidemic_fanout, + (config.meta_epidemic_fanout + 1) / 2, ); info!("Initialize block manager..."); diff --git a/src/util/config.rs b/src/util/config.rs index 2834953..5c01712 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -24,8 +24,8 @@ pub struct Config { #[serde(default = "default_replication_factor")] pub meta_replication_factor: usize, - #[serde(default = "default_epidemic_factor")] - pub meta_epidemic_factor: usize, + #[serde(default = "default_epidemic_fanout")] + pub meta_epidemic_fanout: usize, #[serde(default = "default_replication_factor")] pub data_replication_factor: usize, @@ -57,7 +57,7 @@ fn default_block_size() -> usize { fn default_replication_factor() -> usize { 3 } -fn default_epidemic_factor() -> usize { +fn default_epidemic_fanout() -> usize { 3 }