layout version: refactor get_node_zone

This commit is contained in:
Alex Auvolat
2023-12-08 11:50:58 +01:00
parent 7f2541101f
commit 063294dd56
2 changed files with 25 additions and 26 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ fn check_against_naive(cl: &LayoutVersion) -> Result<bool, Error> {
zone_token.insert(z.clone(), 0);
}
for uuid in cl.nongateway_nodes() {
let z = cl.get_node_zone(&uuid)?;
let c = cl.get_node_capacity(&uuid).unwrap();
let z = cl.expect_get_node_zone(&uuid);
let c = cl.expect_get_node_capacity(&uuid);
zone_token.insert(
z.to_string(),
zone_token[z] + min(NB_PARTITIONS, (c / over_size) as usize),