Merge pull request #10907 from damnever/fix/panic

Fix panic if series is not found when deleting series
This commit is contained in:
Julien Pivotto 2022-06-30 11:23:08 +02:00 committed by GitHub
commit bacd776356
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1115,6 +1115,10 @@ func (h *Head) Delete(mint, maxt int64, ms ...*labels.Matcher) error {
var stones []tombstones.Stone
for p.Next() {
series := h.series.getByID(chunks.HeadSeriesRef(p.At()))
if series == nil {
level.Debug(h.logger).Log("msg", "Series not found in Head.Delete")
continue
}
series.RLock()
t0, t1 := series.minTime(), series.maxTime()