Skip to content
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

Notifier: fix deadlock when zero alerts #13861

Merged

Conversation

simonpasquier
Copy link
Member

When all alerts were dropped after alert relabeling, the sendAll() function didn't release the lock properly which created a deadlock with the Alertmanager target discovery.

In addition, the commit detects early when there are no Alertmanager endpoint to notify to avoid unnecessary work.

@bboreham I've found the bug while playing with the feature. Since it is a 2.51 addition, I made the PR against release-2.51 branch.

Copy link
Member

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but please make the linter happy

When all alerts were dropped after alert relabeling, the `sendAll()`
function didn't release the lock properly which created a deadlock with
the Alertmanager target discovery.

In addition, the commit detects early when there are no Alertmanager
endpoint to notify to avoid unnecessary work.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier
Copy link
Member Author

🤦 should be fixed now.

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.

None yet

2 participants