AnonHxy commented on code in PR #19934:
URL: https://github.com/apache/pulsar/pull/19934#discussion_r1154064376
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java:
##########
@@ -102,6 +102,11 @@ public class
PersistentStickyKeyDispatcherMultipleConsumers extends PersistentDi
@Override
public synchronized void addConsumer(Consumer consumer) throws
BrokerServiceException {
+ if (IS_CLOSED_UPDATER.get(this) == TRUE) {
+ log.warn("[{}] Dispatcher is already closed. Closing consumer {}",
name, consumer);
+ consumer.disconnect();
+ return;
+ }
super.addConsumer(consumer);
Review Comment:
However the `super.addConsumer` return value is `void`. The method in
subClass will not fast return if `super.addConsumer` return. @poorbarcode
--
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]