Browse Source

rules: add comment about lock taking (#4525)

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
pull/4268/merge
Goutham Veeramachaneni 6 years ago committed by Julius Volz
parent
commit
f3b7c22827
  1. 2
      rules/alerting.go

2
rules/alerting.go

@ -365,6 +365,8 @@ func (r *AlertingRule) Eval(ctx context.Context, ts time.Time, query QueryFunc,
}
}
// We have already acquired the lock above hence using SetHealth and
// SetLastError will deadlock.
r.health = HealthGood
r.lastError = err
return vec, nil

Loading…
Cancel
Save