feat(storage): improve admin panel

This commit is contained in:
Edouard Vanbelle
2026-08-01 16:37:23 +02:00
parent cc439aaff9
commit 8329b4aa56
15 changed files with 1106 additions and 653 deletions
+5 -6
View File
@@ -2155,12 +2155,11 @@ impl DedupService {
// is NULL, COALESCE inlines the literal integer `0`, the row
// decodes fine, and the bug never surfaces during dev — hence
// it lasted so long.
let (total_blobs, total_bytes_stored): (i64, i64) = sqlx::query_as(
"SELECT COUNT(*), COALESCE(SUM(size), 0)::bigint FROM storage.blobs",
)
.fetch_one(self.pool.as_ref())
.await
.unwrap_or((0, 0));
let (total_blobs, total_bytes_stored): (i64, i64) =
sqlx::query_as("SELECT COUNT(*), COALESCE(SUM(size), 0)::bigint FROM storage.blobs")
.fetch_one(self.pool.as_ref())
.await
.unwrap_or((0, 0));
// Referenced bytes from CDC manifests. Same `numeric`-vs-`bigint`
// gotcha: `SUM(numeric)` → `numeric`; wrap the whole sum in