Merge pull request #15162 from prometheus/cp-15210-2-55

[Release 2.55] [BUGFIX] TSDB: Don't read in-order chunks from before head MinTime
This commit is contained in:
Bryan Boreham 2024-10-15 14:52:07 +01:00 committed by GitHub
commit e26a3dba16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2043,7 +2043,7 @@ func (db *DB) Querier(mint, maxt int64) (_ storage.Querier, err error) {
overlapsOOO := overlapsClosedInterval(mint, maxt, db.head.MinOOOTime(), db.head.MaxOOOTime())
var headQuerier storage.Querier
inoMint := mint
inoMint := max(db.head.MinTime(), mint)
if maxt >= db.head.MinTime() || overlapsOOO {
rh := NewRangeHead(db.head, mint, maxt)
var err error
@ -2121,7 +2121,7 @@ func (db *DB) blockChunkQuerierForRange(mint, maxt int64) (_ []storage.ChunkQuer
overlapsOOO := overlapsClosedInterval(mint, maxt, db.head.MinOOOTime(), db.head.MaxOOOTime())
var headQuerier storage.ChunkQuerier
inoMint := mint
inoMint := max(db.head.MinTime(), mint)
if maxt >= db.head.MinTime() || overlapsOOO {
rh := NewRangeHead(db.head, mint, maxt)
headQuerier, err = db.blockChunkQuerierFunc(rh, mint, maxt)