-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Branch-2.8] Fix Broker HealthCheck Endpoint Exposes Race Conditions. #14618
[Branch-2.8] Fix Broker HealthCheck Endpoint Exposes Race Conditions. #14618
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.
LGTM
@Technoboy- I am looking here this is the original commit it is fine to amend it and adapt it to the target branch, but my point is that in the git history @mattisonchao should be listed as author of the patch (whenever it is possible). |
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.
LGTM
committing as soon as CI is green
Yes, I see. Thanks. But there are a lot of conflicts when cherry-picking. So I have to rewrite it according to the original one. We can add the author info when merging. (I'm not for any commits record here, but for speeding up the release.) |
Ok, fixed. |
…apache#14618) (cherry picked from commit 32f8065)
…apache#14618) (cherry picked from commit 32f8065)
Cherry-pick #14367
Master Issue: #14362
Motivation
See #14362
According to relative PR #7724, we will force delete all subscriptions when calling
healthCheck
REST API. but it has a race condition when two threads call this API.Please consider this case:
So, in this case, the reader of thread A is deleted and then an NPE or other exception occurs.
Modifications
Completable#handle
to fix problem 1, the reader needs to be closed regardless of whether there is an exception.Verifying this change
Documentation
no-need-doc