BewareMyPower commented on code in PR #22283:
URL: https://github.com/apache/pulsar/pull/22283#discussion_r1531670584


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -190,9 +190,15 @@ public synchronized CompletableFuture<Void> 
addConsumer(Consumer consumer) {
         }
 
         if (isConsumersExceededOnSubscription()) {
-            log.warn("[{}] Attempting to add consumer to subscription which 
reached max consumers limit", name);
+            log.warn("[{}] Attempting to add consumer to subscription which 
reached max consumers limit {}",
+                    name, consumer);
             return FutureUtil.failedFuture(new 
ConsumerBusyException("Subscription reached max consumers limit"));
         }
+        if (consumerSet.contains(consumer)) {

Review Comment:
   It should not block this PR because the race is hard to happen for 
non-persistent consumers. Feel free to resolve this conversation if necessary.



-- 
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]

Reply via email to