diff options
author | Alex Auvolat <alex@adnab.me> | 2023-12-07 14:27:53 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-12-07 14:51:20 +0100 |
commit | 9cecea64d4509e95ac9793b29c947e2ecf9bb0b8 (patch) | |
tree | 38e9f105004ceea86e064892aab5f20f9c3c4f46 /src/rpc/layout/schema.rs | |
parent | aa59059a910eb6e1e824b84413a66909d697ef8a (diff) | |
download | garage-9cecea64d4509e95ac9793b29c947e2ecf9bb0b8.tar.gz garage-9cecea64d4509e95ac9793b29c947e2ecf9bb0b8.zip |
layout: allow sync update tracker to progress with only quorums
Diffstat (limited to 'src/rpc/layout/schema.rs')
-rw-r--r-- | src/rpc/layout/schema.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/layout/schema.rs b/src/rpc/layout/schema.rs index 49e84420..df949906 100644 --- a/src/rpc/layout/schema.rs +++ b/src/rpc/layout/schema.rs @@ -411,13 +411,13 @@ impl UpdateTracker { pub(crate) fn min_among(&self, storage_nodes: &[Uuid], min_version: u64) -> u64 { storage_nodes .iter() - .map(|x| self.0.get(x).copied().unwrap_or(min_version)) + .map(|x| self.get(x, min_version)) .min() .unwrap_or(min_version) } - pub fn get(&self, node: &Uuid) -> u64 { - self.0.get(node).copied().unwrap_or(0) + pub fn get(&self, node: &Uuid, min_version: u64) -> u64 { + self.0.get(node).copied().unwrap_or(min_version) } } |