lhotari commented on code in PR #17638:
URL: https://github.com/apache/pulsar/pull/17638#discussion_r970490001
##########
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:
Good point. However, in AbstractMetadataStore, the other notifications are
delivered using a separate thread pool:
https://github.com/apache/pulsar/blob/d8c39bcb5becd15944978755c0b02fc52182fa69/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java#L273-L289
This PR makes AbstractMetadataStore more consistent by also delivering
session events using this same thread pool.
--
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]