diff --git a/backend/handlers/payments/locks.go b/backend/handlers/payments/locks.go index 4dcabd5..d99020d 100644 --- a/backend/handlers/payments/locks.go +++ b/backend/handlers/payments/locks.go @@ -39,15 +39,8 @@ func acquireAdvisoryLock(ctx context.Context, conn *pgxpool.Conn, key string) (b return tryAdvisoryLock(ctx, conn, key, "pg_try_advisory_lock") } -// acquireAdvisoryXactLock is the transaction-scoped variant of -// acquireAdvisoryLock: the lock is held on the transaction and auto-released -// at commit/rollback, so the caller must NOT unlock explicitly. -func acquireAdvisoryXactLock(ctx context.Context, tx pgx.Tx, key string) (bool, error) { - return tryAdvisoryLock(ctx, tx, key, "pg_try_advisory_xact_lock") -} - // acquireAdvisoryXactLockBlocking is the transaction-scoped BLOCKING variant -// of acquireAdvisoryXactLock: it issues `SELECT pg_advisory_xact_lock(...)` +// of acquireAdvisoryLock: it issues `SELECT pg_advisory_xact_lock(...)` // ONCE and waits for as long as the key is contended — there is no 3s bound. // The lock is transaction-scoped, so it is auto-released at the caller's // commit/rollback (never unlocked explicitly).