merlimat commented on a change in pull request #13742:
URL: https://github.com/apache/pulsar/pull/13742#discussion_r784189595
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -356,14 +355,15 @@ public void enableCnxAutoRead() {
}
protected boolean hasLocalProducers() {
- AtomicBoolean foundLocal = new AtomicBoolean(false);
- producers.values().forEach(producer -> {
+ if (producers.isEmpty()) {
+ return false;
+ }
+ for (Producer producer : producers.values()) {
Review comment:
Oh, you're right, we using the regular `ConcurrentHashMap` here instead
of the other custom map.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]