admin api: don't fail in getclusterstatistics when counting total objects/bytes

This commit is contained in:
Alex Auvolat
2026-03-17 11:36:18 +01:00
committed by Alex
parent 6131318c80
commit b81eae3f65
+6 -7
View File
@@ -174,14 +174,13 @@ impl RequestHandler for GetClusterStatisticsRequest {
.await?; .await?;
let bucket_stats_opt = if buckets.len() < 1000 { let bucket_stats_opt = if buckets.len() < 1000 {
Some( futures::future::try_join_all(
futures::future::try_join_all( buckets
buckets .iter()
.iter() .map(|b| garage.object_counter_table.table.get(&b.id, &EmptyKey)),
.map(|b| garage.object_counter_table.table.get(&b.id, &EmptyKey)),
)
.await?,
) )
.await
.ok()
} else { } else {
None None
}; };