risdenk commented on code in PR #833:
URL: https://github.com/apache/solr/pull/833#discussion_r864074268


##########
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##########
@@ -2754,19 +2760,18 @@ private boolean fireEventListeners(String zkDir) {
       if (listeners != null && !listeners.isEmpty()) {
         final Set<Runnable> listenersCopy = new HashSet<>(listeners);
         // run these in a separate thread because this can be long running
-        new Thread(
-                () -> {
-                  log.debug("Running listeners for {}", zkDir);
-                  for (final Runnable listener : listenersCopy) {
-                    try {
-                      listener.run();
-                    } catch (Exception e) {
-                      log.warn("listener throws error", e);
-                    }
-                  }
-                },
-                "ZKEventListenerThread")
-            .start();
+        fireEventListenersThreadPool.submit(
+            () -> {
+              log.debug("Running listeners for {}", zkDir);
+              for (final Runnable listener : listenersCopy) {
+                try {
+                  listener.run();
+                } catch (Exception e) {
+                  log.warn("listener throws error", e);
+                }
+              }
+              return null;

Review Comment:
   Yup - addressed in dd022238b06df8614a4bd52b2e6fee199b69c9a0



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to