update condition
This commit is contained in:
parent
5e33c3cfc9
commit
7cda917b6b
@ -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 New Issue
Block a user