From 9b759135d15ceb4c9aab0e39be260543051e8e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Thu, 11 Jan 2024 12:07:54 +0200 Subject: [PATCH] tsdb/compact: fix passing merge func MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixing a very small logical problem I've introduced :(. Signed-off-by: Giedrius Statkevičius --- tsdb/compact.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsdb/compact.go b/tsdb/compact.go index c5bd2ed2a6..e9639f1e05 100644 --- a/tsdb/compact.go +++ b/tsdb/compact.go @@ -178,8 +178,8 @@ func NewLeveledCompactorWithOptions(ctx context.Context, r prometheus.Registerer if l == nil { l = log.NewNopLogger() } - var mergeFunc storage.VerticalChunkSeriesMergeFunc - if opts.MergeFunc == nil { + mergeFunc := opts.MergeFunc + if mergeFunc == nil { mergeFunc = storage.NewCompactingChunkSeriesMerger(storage.ChainedSeriesMerge) } var maxBlockChunkSegmentSize int64