Tentative fix #414 #429

Merged
lx merged 1 commit from try-fix-414 into main 2022-11-21 21:45:17 +00:00
Showing only changes of commit 54e800ef8d - Show all commits

View file

@ -254,9 +254,11 @@ To know the correct value of the new layout version, invoke `garage layout show`
match self.initial_partition_assignation() { match self.initial_partition_assignation() {
Some(initial_partitions) => { Some(initial_partitions) => {
for (part, ipart) in partitions.iter_mut().zip(initial_partitions.iter()) { for (part, ipart) in partitions.iter_mut().zip(initial_partitions.iter()) {
for (id, info) in ipart.nodes.iter() { for _ in 0..2 {
if part.nodes.len() < self.replication_factor { for (id, info) in ipart.nodes.iter() {
part.add(None, n_zones, id, info.unwrap()); if part.nodes.len() < self.replication_factor {
part.add(None, n_zones, id, info.unwrap());
}
} }
} }
assert!(part.nodes.len() == self.replication_factor); assert!(part.nodes.len() == self.replication_factor);