From 575b23adb61e469ba21d160f12ad3fca35423984 Mon Sep 17 00:00:00 2001
From: Tyler <109685178+tlongwell-block@users.noreply.github.com>
Date: Tue, 21 Jul 2026 13:08:50 -0700
Subject: [PATCH] Revert "feat(relay): inventory unreachable Git objects
(#2264)"
This reverts commit 3afc9dae159262220c4149e9c8add50772869318.
---
.env.example | 8 -
bin/.helm-3.16.4.pkg | 1 -
bin/helm | 1 -
crates/buzz-db/src/lib.rs | 21 +-
crates/buzz-relay/src/api/git/gc.rs | 529 -------------------
crates/buzz-relay/src/api/git/mod.rs | 1 -
crates/buzz-relay/src/api/git/store.rs | 84 ---
crates/buzz-relay/src/main.rs | 31 +-
crates/buzz-relay/src/metrics.rs | 5 -
deploy/charts/buzz/templates/deployment.yaml | 6 -
deploy/charts/buzz/values.schema.json | 14 +-
deploy/charts/buzz/values.yaml | 7 -
docs/git-on-object-storage.md | 11 -
13 files changed, 19 insertions(+), 700 deletions(-)
delete mode 120000 bin/.helm-3.16.4.pkg
delete mode 120000 bin/helm
delete mode 100644 crates/buzz-relay/src/api/git/gc.rs
diff --git a/.env.example b/.env.example
index 3dccd6a174..1e69c6a0e3 100644
--- a/.env.example
+++ b/.env.example
@@ -75,14 +75,6 @@ RELAY_URL=ws://localhost:3000
# BUZZ_GIT_PACK_CACHE_PATH=./repos/.pack-cache
# BUZZ_GIT_PACK_CACHE_MAX_BYTES=5368709120
# BUZZ_GIT_PACK_CACHE_MAX_CONCURRENT_POPULATIONS=2
-# Deployment-global dry-run inventory for future physical object-store GC.
-# No objects are deleted. Disabled by default.
-# BUZZ_GIT_GC_ENABLED=false
-# BUZZ_GIT_GC_INTERVAL_SECS=3600
-# BUZZ_GIT_GC_MAX_POINTERS=10000
-# BUZZ_GIT_GC_MAX_OBJECTS_PER_PREFIX=10000
-# BUZZ_GIT_GC_MAX_MANIFEST_BYTES_PER_SCAN=536870912
-# BUZZ_GIT_GC_SCAN_TIMEOUT_SECS=300
# -----------------------------------------------------------------------------
# Media Upload Admission
diff --git a/bin/.helm-3.16.4.pkg b/bin/.helm-3.16.4.pkg
deleted file mode 120000
index 383f4511d4..0000000000
--- a/bin/.helm-3.16.4.pkg
+++ /dev/null
@@ -1 +0,0 @@
-hermit
\ No newline at end of file
diff --git a/bin/helm b/bin/helm
deleted file mode 120000
index 840f4f2a13..0000000000
--- a/bin/helm
+++ /dev/null
@@ -1 +0,0 @@
-.helm-3.16.4.pkg
\ No newline at end of file
diff --git a/crates/buzz-db/src/lib.rs b/crates/buzz-db/src/lib.rs
index 3eeff5dee7..fdd72c3c32 100644
--- a/crates/buzz-db/src/lib.rs
+++ b/crates/buzz-db/src/lib.rs
@@ -198,16 +198,16 @@ pub struct DbPoolStats {
pub max: u32,
}
-/// Owns a detached Postgres session holding a relay advisory leader lock.
+/// Owns the detached Postgres session holding the relay usage-metrics advisory lock.
///
/// The connection deliberately does not return to the main pool: session advisory
/// locks must remain bound to this exact physical connection, and the poller
/// pings it before each leader-only collection tick.
-pub struct AdvisoryLockLeader {
+pub struct UsageMetricsLeader {
connection: PgConnection,
}
-impl AdvisoryLockLeader {
+impl UsageMetricsLeader {
/// Returns whether the lock-owning session is still reachable.
///
/// Bounded to 5 seconds — a blackholed connection (no RST) would otherwise
@@ -508,20 +508,23 @@ impl Db {
})
}
- /// Try to acquire a detached session advisory lock for singleton relay work.
+ /// Try to acquire the detached session advisory lock for relay usage metrics.
///
/// The returned guard owns the exact connection that acquired the lock. It is
/// detached from the shared pool so a stable leader neither returns a locked
/// session to other callers nor permanently consumes a pool slot. Dropping the
/// guard closes the connection and releases the session-scoped lock.
- pub async fn try_advisory_lock(&self, lock_key: i64) -> Result