Unverified Commit 8219b442 by Anonymous Committed by GitHub

rules: Remove redundant RLock to avoid double RLock (#7183)

Signed-off-by: 's avatarBurtonQin <bobbqqin@gmail.com>
parent 808a1456
Pipeline #66343 passed with stages
in 7 minutes 20 seconds
......@@ -1109,9 +1109,6 @@ func (m *Manager) Rules() []Rule {
// AlertingRules returns the list of the manager's alerting rules.
func (m *Manager) AlertingRules() []*AlertingRule {
m.mtx.RLock()
defer m.mtx.RUnlock()
alerts := []*AlertingRule{}
for _, rule := range m.Rules() {
if alertingRule, ok := rule.(*AlertingRule); ok {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment