Skip to content

Changes related to reducing lock contention #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release-2025-4-7
Choose a base branch
from

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