Merge pull request #13407 from pracucci/fix-13242-regressions

Fix regressions introduced by #13242
This commit is contained in:
Bryan Boreham 2024-01-16 13:19:31 +00:00 committed by GitHub
commit 7153f61790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,12 +188,12 @@ func NewLeveledCompactorWithOptions(ctx context.Context, r prometheus.Registerer
if mergeFunc == nil { if mergeFunc == nil {
mergeFunc = storage.NewCompactingChunkSeriesMerger(storage.ChainedSeriesMerge) mergeFunc = storage.NewCompactingChunkSeriesMerger(storage.ChainedSeriesMerge)
} }
var maxBlockChunkSegmentSize int64 maxBlockChunkSegmentSize := opts.MaxBlockChunkSegmentSize
if opts.MaxBlockChunkSegmentSize == 0 { if maxBlockChunkSegmentSize == 0 {
maxBlockChunkSegmentSize = chunks.DefaultChunkSegmentSize maxBlockChunkSegmentSize = chunks.DefaultChunkSegmentSize
} }
var pe index.PostingsEncoder pe := opts.PE
if opts.PE == nil { if pe == nil {
pe = index.EncodePostingsRaw pe = index.EncodePostingsRaw
} }
return &LeveledCompactor{ return &LeveledCompactor{