Skip to content

Conversation

rajagopalanand
Copy link

@rajagopalanand rajagopalanand commented Apr 10, 2025

  • The func (a *Alerts) count(state types.AlertState) int { in mem.go acquires a lock which is unnecessary. The count method makes a copy of the alerts by called a.alerts.List(). Therefore this lock can be safely removed
Screenshot 2025-04-10 at 7 35 47 PM

@rajagopalanand rajagopalanand force-pushed the reduce-lock-contention branch from 2be7b6c to 1330b16 Compare April 11, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants