-
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
DLQProducer's creation condition check is incorrect #9162
Labels
type/bug
The PR fixed a bug or issue reported a bug
Comments
1 task
sijie
pushed a commit
that referenced
this issue
Jan 18, 2021
Fixes #9162 ### Motivation When we check if we need to create producer for DLQ, we used double-checked locking, https://github.com/apache/pulsar/blame/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L701-L712 however we should do the second check after we acquired the lock, and the field we're checking should be a volatile field. ### Modifications Fix the double-checked locking and make the field volatile.
codelipenghui
pushed a commit
that referenced
this issue
Jan 19, 2021
Fixes #9162 ### Motivation When we check if we need to create producer for DLQ, we used double-checked locking, https://github.com/apache/pulsar/blame/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L701-L712 however we should do the second check after we acquired the lock, and the field we're checking should be a volatile field. ### Modifications Fix the double-checked locking and make the field volatile. (cherry picked from commit b019c4b)
merlimat
pushed a commit
to merlimat/pulsar
that referenced
this issue
Apr 6, 2021
…e#9166) Fixes apache#9162 ### Motivation When we check if we need to create producer for DLQ, we used double-checked locking, https://github.com/apache/pulsar/blame/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L701-L712 however we should do the second check after we acquired the lock, and the field we're checking should be a volatile field. ### Modifications Fix the double-checked locking and make the field volatile.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we check if we need to create producer for DLQ, we used double-checked locking, https://github.com/apache/pulsar/blame/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L701-L712
however we should do the second check after we acquired the lock, and the field we're checking should be a volatile field.
The text was updated successfully, but these errors were encountered: