aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2022-11-21 21:45:17 +0000
committerAlex <alex@adnab.me>2022-11-21 21:45:17 +0000
commit293139a94a8911aaac1b650e4707379a972196aa (patch)
tree7bf9752691820cfae0bac8de31909048032d0366
parent1e40c93fd033ab5d373425dffe4a855f2ba14304 (diff)
parent54e800ef8dec7f0e35733ce75cb3d214a48ca354 (diff)
downloadgarage-293139a94a8911aaac1b650e4707379a972196aa.tar.gz
garage-293139a94a8911aaac1b650e4707379a972196aa.zip
Merge pull request 'Tentative fix #414' (#429) from try-fix-414 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/429
-rw-r--r--src/rpc/layout.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc/layout.rs b/src/rpc/layout.rs
index f517f36f..2fd5acfc 100644
--- a/src/rpc/layout.rs
+++ b/src/rpc/layout.rs
@@ -254,9 +254,11 @@ To know the correct value of the new layout version, invoke `garage layout show`
match self.initial_partition_assignation() {
Some(initial_partitions) => {
for (part, ipart) in partitions.iter_mut().zip(initial_partitions.iter()) {
- for (id, info) in ipart.nodes.iter() {
- if part.nodes.len() < self.replication_factor {
- part.add(None, n_zones, id, info.unwrap());
+ for _ in 0..2 {
+ for (id, info) in ipart.nodes.iter() {
+ if part.nodes.len() < self.replication_factor {
+ part.add(None, n_zones, id, info.unwrap());
+ }
}
}
assert!(part.nodes.len() == self.replication_factor);