提交 492ac497 编写于 作者: N ning

refactor

上级 dcbca220
......@@ -106,12 +106,12 @@ func (rh *RuleHolder) SyncAlertRules() {
}
for hash, rule := range externalAllRules {
rh.externalLock.RLock()
rh.externalLock.Lock()
if _, has := rh.externalAlertRules[hash]; !has {
rule.Prepare()
rh.externalAlertRules[hash] = rule
}
rh.externalLock.RUnlock()
rh.externalLock.Unlock()
}
rh.externalLock.Lock()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册