Skip to content

Commit d456497

Browse files
committed
chore: increase connection logs batch size to 10000
Increase from 1000 to 10000 to improve deletion throughput for large deployments. At 10 minute intervals, this allows purging up to 1.44M records per day.
1 parent 24a6d95 commit d456497

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

coderd/database/dbpurge/dbpurge.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ const (
2525
// The `connection_logs` table is purged based on the configured retention.
2626
maxAuditLogConnectionEventAge = 90 * 24 * time.Hour // 90 days
2727
auditLogConnectionEventBatchSize = 1000
28-
// Batch size for connection log deletion. Smaller batches prevent long-held
29-
// locks that could impact concurrent database operations.
30-
connectionLogsBatchSize = 1000
28+
// Batch size for connection log deletion.
29+
connectionLogsBatchSize = 10000
3130
// Telemetry heartbeats are used to deduplicate events across replicas. We
3231
// don't need to persist heartbeat rows for longer than 24 hours, as they
3332
// are only used for deduplication across replicas. The time needs to be

0 commit comments

Comments
 (0)