mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
admin api: don't fail in getclusterstatistics when counting total objects/bytes
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user