rules: add comment about lock taking (#4525)
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
parent
c663477688
commit
f3b7c22827
|
@ -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…
Reference in New Issue