-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Java client] Consumer#receive returns null in case of InterruptedException and does not reset Thread.interrupted flag #9921
Labels
Comments
1 task
lhotari
added a commit
to lhotari/nosqlbench
that referenced
this issue
Nov 11, 2021
- see apache/pulsar#12456 for details. - the bug applies to the use of receiveAsync and the workaround is to avoid the use of receiveAsync until the fix is included in the client - receiveAsync was introduced previously to workaround the bug apache/pulsar#9921 - that issue isn't critical
The issue had no activity for 30 days, mark with Stale label. |
I've updated #10163 to a mergable status. But it seems that we don't return null in this case anymore. Please check if it's still a valid issue @eolivelli . |
Well. I can see we return null in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
if you execute Consumer#receive() and thread is Interrupted the method returns a null value but it does not set Thread.currentThead().interrupt().
This way the caller is not aware of the Interrupted status of the Thread and cannot deal with this situation appropriately.
Expected behavior
Returning null is fine, but we must set Thread.currentThread.interrupt() and also document this behaviour in the javadocs
The text was updated successfully, but these errors were encountered: