From 65d474bfa4103537ef5f7084410eacd7c79cbe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Sencer=20=C3=96zcan?= <32759850+mustafasencer@users.noreply.github.com> Date: Tue, 25 Mar 2025 16:00:12 +0100 Subject: [PATCH] chore(unified-storage): update default pruner history limit (#102799) --- pkg/storage/unified/sql/backend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/storage/unified/sql/backend.go b/pkg/storage/unified/sql/backend.go index f3944720c00..6d2e0b4c01e 100644 --- a/pkg/storage/unified/sql/backend.go +++ b/pkg/storage/unified/sql/backend.go @@ -27,6 +27,7 @@ import ( const tracePrefix = "sql.resource." const defaultPollingInterval = 100 * time.Millisecond const defaultWatchBufferSize = 100 // number of events to buffer in the watch stream +const defaultPrunerHistoryLimit = 20 type Backend interface { resource.StorageBackend @@ -211,7 +212,7 @@ func (b *backend) initPruner(ctx context.Context) error { return b.db.WithTx(ctx, ReadCommitted, func(ctx context.Context, tx db.Tx) error { res, err := dbutil.Exec(ctx, tx, sqlResourceHistoryPrune, &sqlPruneHistoryRequest{ SQLTemplate: sqltemplate.New(b.dialect), - HistoryLimit: 100, + HistoryLimit: defaultPrunerHistoryLimit, Key: &resource.ResourceKey{ Namespace: key.namespace, Group: key.group,