tsdb/compact: fix passing merge func

Fixing a very small logical problem I've introduced :(.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
This commit is contained in:
Giedrius Statkevičius 2024-01-11 12:07:54 +02:00
parent 6150e1ca0e
commit 9b759135d1

View file

@ -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