mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 07:23:02 +00:00
rules: Remove redundant RLock to avoid double RLock (#7183)
Signed-off-by: BurtonQin <bobbqqin@gmail.com>
This commit is contained in:
parent
808a14569d
commit
8219b442c8
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user