diff options
author | Alex Auvolat <alex@adnab.me> | 2023-11-15 14:20:50 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-11-15 14:20:50 +0100 |
commit | 393c4d4515e0cdadadc8de8ae2df12e4371cff88 (patch) | |
tree | 1805db8a9697a723abd76f26f2cd421d9f5960a5 /src/model/index_counter.rs | |
parent | 65066c70640371cc318faddfb4c05c96de18e86d (diff) | |
download | garage-393c4d4515e0cdadadc8de8ae2df12e4371cff88.tar.gz garage-393c4d4515e0cdadadc8de8ae2df12e4371cff88.zip |
layout: add helper for cached/external values to centralize recomputation
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r-- | src/model/index_counter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs index 2d968733..e8702bf1 100644 --- a/src/model/index_counter.rs +++ b/src/model/index_counter.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use garage_db as db; -use garage_rpc::layout::LayoutHistory; +use garage_rpc::layout::LayoutHelper; use garage_rpc::system::System; use garage_util::background::BackgroundRunner; use garage_util::data::*; @@ -83,7 +83,7 @@ impl<T: CountedItem> Entry<T::CP, T::CS> for CounterEntry<T> { } impl<T: CountedItem> CounterEntry<T> { - pub fn filtered_values(&self, layout: &LayoutHistory) -> HashMap<String, i64> { + pub fn filtered_values(&self, layout: &LayoutHelper) -> HashMap<String, i64> { let nodes = layout.all_nongateway_nodes(); self.filtered_values_with_nodes(&nodes) } |