eolivelli commented on code in PR #17638:
URL: https://github.com/apache/pulsar/pull/17638#discussion_r970491691


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java:
##########
@@ -409,14 +409,19 @@ public void 
registerSessionListener(Consumer<SessionEvent> listener) {
 
     protected void receivedSessionEvent(SessionEvent event) {
         isConnected = event.isConnected();
-
-        sessionListeners.forEach(l -> {
-            try {
-                l.accept(event);
-            } catch (Throwable t) {
-                log.warn("Error in processing session event", t);
-            }
-        });
+        try {
+            executor.execute(() -> {

Review Comment:
   I noticed that call as well ;-) 
   
   So overall I agree with this patch, because it makes it consistent the way 
we dispatch the events.
   
   But I am not 100% sure that it will fix the original problem



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