diff --git a/tsdb/compact.go b/tsdb/compact.go index c5bd2ed2a..e9639f1e0 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