diff --git a/src/server/engine/worker.go b/src/server/engine/worker.go index eb006a05..0cbc811a 100644 --- a/src/server/engine/worker.go +++ b/src/server/engine/worker.go @@ -330,6 +330,14 @@ func (r RuleEval) fireEvent(event *models.AlertCurEvent) { } func (r RuleEval) recoverRule(alertingKeys map[string]struct{}, now int64) { + for hash := range r.pendings { + if _, has := alertingKeys[hash]; has { + continue + } + + delete(r.pendings, hash) + } + for hash, event := range r.fires { if _, has := alertingKeys[hash]; has { continue