layout & replication mode refactoring

This commit is contained in:
Alex Auvolat
2025-03-25 11:05:00 +01:00
parent c9156f6828
commit 2f2a96b51d
7 changed files with 55 additions and 61 deletions
+1 -4
View File
@@ -475,10 +475,7 @@ impl System {
let mut partitions_quorum = 0;
let mut partitions_all_ok = 0;
for (_, hash) in partitions.iter() {
let mut write_sets = layout
.versions()
.iter()
.map(|x| x.nodes_of(hash, x.replication_factor));
let mut write_sets = layout.versions().iter().map(|x| x.nodes_of(hash));
let has_quorum = write_sets
.clone()
.all(|set| set.filter(|x| node_up(x)).count() >= quorum);