-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Avoid listener blocking #1482
Avoid listener blocking #1482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waterdrink do I understand this change correctly, that instead of sending all alerts to all iterators, including those that are already done, it only sends alerts to not-yet-done listeners and skips the others via case <-l.done:
? I guess a listener can not be removed during that time, as Puts()
holds the lock?
Not related, you are missing the sign-off line in your commit message, see Details
on the DCO failure. Simply do a git commit --amend --no-edit -s
and push the new commit.
@mxinden The listener do can not be removed when |
My fault. I messed up the pull request commit, and have no idea why ci is failed at config_test.go.I can close this one and start a new pull request if needed. |
This is not related to your patch and will be fixed with #1486. |
It's fine to keep working in this PR. |
Signed-off-by: wangyue <wangyue@actiontech.com>
66b76fa
to
6334c31
Compare
hi, I did rebase for ease of viewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. #1503 adds a test failing without this fix.
Still leaving @stuartnelson3 and @simonpasquier some time to have a look before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay, thanks for adding this
@waterdrink great catch! Thanks for the contribution. |
Signed-off-by: wangyue <wangyue@actiontech.com>
close #1469