From b81eae3f6517a93235e7741f84d586f3f26ca252 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 17 Mar 2026 11:36:18 +0100 Subject: [PATCH] admin api: don't fail in getclusterstatistics when counting total objects/bytes --- src/api/admin/cluster.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 8477b116..15fe370a 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -174,14 +174,13 @@ impl RequestHandler for GetClusterStatisticsRequest { .await?; let bucket_stats_opt = if buckets.len() < 1000 { - Some( - futures::future::try_join_all( - buckets - .iter() - .map(|b| garage.object_counter_table.table.get(&b.id, &EmptyKey)), - ) - .await?, + futures::future::try_join_all( + buckets + .iter() + .map(|b| garage.object_counter_table.table.get(&b.id, &EmptyKey)), ) + .await + .ok() } else { None };