Skip to content

Commit 72dfec3

Browse files
authored
Fix race that can cause nil reference when using expanded postings (#6518)
Signed-off-by: alanprot <[email protected]>
1 parent 7ed0c41 commit 72dfec3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/ingester/ingester.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,6 +2808,9 @@ func (i *Ingester) expirePostingsCache(ctx context.Context) error {
28082808
return nil
28092809
}
28102810
userDB := i.getTSDB(userID)
2811+
if userDB == nil || userDB.postingCache == nil {
2812+
continue
2813+
}
28112814
userDB.postingCache.PurgeExpiredItems()
28122815
}
28132816

0 commit comments

Comments
 (0)