Skip to content

Commit

Permalink
adding comments
Browse files Browse the repository at this point in the history
Signed-off-by: alanprot <[email protected]>
  • Loading branch information
alanprot committed Jan 28, 2025
1 parent 0e17f08 commit 87175eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,11 @@ func (i *Ingester) blockChunkQuerierFunc(userId string) tsdb.BlockChunkQuerierFu
if db != nil {
postingCache = db.postingCache
}

// Caching expanded postings for queries that are "in the future" may lead to incorrect results being cached.
// This occurs because the tsdb.PostingsForMatchers function can return invalid data in such scenarios.
// For more details, see: https://github.com/cortexproject/cortex/issues/6556
// TODO: alanprot: Consider removing this logic when prometheus is updated as this logic is "fixed" upstream.
if postingCache == nil || mint > db.Head().MaxTime() {
return tsdb.NewBlockChunkQuerier(b, mint, maxt)
}
Expand Down

0 comments on commit 87175eb

Please sign in to comment.