querier for RestoreForState not closed. (#4922)

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
Krasi Georgiev 2018-11-28 15:25:17 +02:00 committed by GitHub
parent c6399296dc
commit 0754e5334b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -490,6 +490,7 @@ func (g *Group) RestoreForState(ts time.Time) {
level.Error(g.logger).Log("msg", "Failed to get Querier", "err", err) level.Error(g.logger).Log("msg", "Failed to get Querier", "err", err)
return return
} }
defer q.Close()
for _, rule := range g.Rules() { for _, rule := range g.Rules() {
alertRule, ok := rule.(*AlertingRule) alertRule, ok := rule.(*AlertingRule)