aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-14 13:36:58 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-14 13:36:58 +0100
commit866196750fca74c1911ade2a90611f3663e60046 (patch)
treeeef416d9b36efaec04a4e52620d739cf43d7b787
parent83a11374ca45831a6f54928dfe726fac65493b00 (diff)
downloadgarage-866196750fca74c1911ade2a90611f3663e60046.tar.gz
garage-866196750fca74c1911ade2a90611f3663e60046.zip
system: add todo wrt new layout
-rw-r--r--src/rpc/system.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index ab3c96b8..86c02e86 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -417,6 +417,9 @@ impl System {
}
pub fn health(&self) -> ClusterHealth {
+ // TODO: adapt this function to take into account layout history
+ // when estimating cluster health, and not just use current layout
+
let quorum = self.replication_mode.write_quorum();
let replication_factor = self.replication_factor;
@@ -429,7 +432,6 @@ impl System {
let layout = self.cluster_layout(); // acquires a rwlock
- // TODO: not only layout.current()
let storage_nodes = layout
.current()
.roles