mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 13:57:36 -08:00
Merge pull request #10907 from damnever/fix/panic
Fix panic if series is not found when deleting series
This commit is contained in:
commit
bacd776356
|
@ -1115,6 +1115,10 @@ func (h *Head) Delete(mint, maxt int64, ms ...*labels.Matcher) error {
|
||||||
var stones []tombstones.Stone
|
var stones []tombstones.Stone
|
||||||
for p.Next() {
|
for p.Next() {
|
||||||
series := h.series.getByID(chunks.HeadSeriesRef(p.At()))
|
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()
|
series.RLock()
|
||||||
t0, t1 := series.minTime(), series.maxTime()
|
t0, t1 := series.minTime(), series.maxTime()
|
||||||
|
|
Loading…
Reference in a new issue