Skip to content

Commit

Permalink
Fix race that can cause nil reference when using expanded postings (#…
Browse files Browse the repository at this point in the history
…6518)

Signed-off-by: alanprot <[email protected]>
  • Loading branch information
alanprot authored Jan 16, 2025
1 parent 7ed0c41 commit 72dfec3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -2808,6 +2808,9 @@ func (i *Ingester) expirePostingsCache(ctx context.Context) error {
return nil
}
userDB := i.getTSDB(userID)
if userDB == nil || userDB.postingCache == nil {
continue
}
userDB.postingCache.PurgeExpiredItems()
}

Expand Down

0 comments on commit 72dfec3

Please sign in to comment.