Skip to content

Commit 1330b16

Browse files
Changes related to reducing lock contention
Signed-off-by: Anand Rajagopal <[email protected]>
1 parent ef5b0e5 commit 1330b16

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

provider/mem/mem.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,6 @@ func (a *Alerts) Put(alerts ...*types.Alert) error {
262262

263263
// count returns the number of non-resolved alerts we currently have stored filtered by the provided state.
264264
func (a *Alerts) count(state types.AlertState) int {
265-
a.mtx.Lock()
266-
defer a.mtx.Unlock()
267-
268265
var count int
269266
for _, alert := range a.alerts.List() {
270267
if alert.Resolved() {

0 commit comments

Comments
 (0)