Skip to content

Commit 9a672dd

Browse files
refactor: rename dblock
1 parent eebb298 commit 9a672dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coderd/database/lock.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212
LockIDDBPurge
1313
LockIDNotificationsReportGenerator
1414
LockIDCryptoKeyRotation
15-
LockIDReconcileTemplatePrebuilds
15+
LockIDReconcilePrebuilds
1616
)
1717

1818
// GenLockID generates a unique and consistent lock ID from a given string.

enterprise/coderd/prebuilds/reconcile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func (c *StoreReconciler) WithReconciliationLock(ctx context.Context, logger slo
342342
start := c.clock.Now()
343343

344344
// Try to acquire the lock. If we can't get it, another replica is handling reconciliation.
345-
acquired, err := db.TryAcquireLock(ctx, database.LockIDReconcileTemplatePrebuilds)
345+
acquired, err := db.TryAcquireLock(ctx, database.LockIDReconcilePrebuilds)
346346
if err != nil {
347347
// This is a real database error, not just lock contention
348348
logger.Error(ctx, "failed to acquire reconciliation lock due to database error", slog.Error(err))

0 commit comments

Comments
 (0)