mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 17:41:01 +00:00
update condition
This commit is contained in:
parent
5e33c3cfc9
commit
7cda917b6b
1 changed files with 2 additions and 3 deletions
|
@ -122,9 +122,8 @@ impl Ring {
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_id, info)| info.datacenter.as_str())
|
.map(|(_id, info)| info.datacenter.as_str())
|
||||||
.collect::<HashSet<&str>>();
|
.collect::<HashSet<&str>>();
|
||||||
if !partitions[qv]
|
if (p_dcs.len() < n_datacenters
|
||||||
.iter()
|
&& !p_dcs.contains(&node_info.datacenter.as_str()))
|
||||||
.any(|(_id, i)| *i.datacenter == node_info.datacenter)
|
|
||||||
|| (p_dcs.len() == n_datacenters
|
|| (p_dcs.len() == n_datacenters
|
||||||
&& !partitions[qv].iter().any(|(id, _i)| id == node_id))
|
&& !partitions[qv].iter().any(|(id, _i)| id == node_id))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue