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?;
|
.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
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user