-
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
[Issue 12723] Fix race condition in PersistentTopic#addReplicationCluster #12729
Conversation
@SuppressFBWarnings | ||
@Override | ||
public boolean equals(Object obj) { | ||
return obj == null; |
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 like a solution that violates the contract of Object.equals. Isn't there an alternative way to achieve the desired outcome?
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.
found this comment as context: #12723 (comment) .
@merlimat would you be able to take a look at the problem and this solution?
…ster (apache#12729) ### Motivation See apache#12723 ### Modifications Add a method org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap#removeNullValue to remove null value in a thread safe way.
…ster (apache#12729) See apache#12723 Add a method org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap#removeNullValue to remove null value in a thread safe way. (cherry picked from commit a3fe00e) (cherry picked from commit 230e1ac)
…ster (apache#12729) ### Motivation See apache#12723 ### Modifications Add a method org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap#removeNullValue to remove null value in a thread safe way.
Fixes #12723
Motivation
See #12723
Modifications
Add a method org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap#removeNullValue to remove null value in a thread safe way.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
no-need-doc
Bug fix.