You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/10 18:38:35 UTC

[lucene-solr] branch reference_impl updated: #55 Cut these executors hard.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new a5e8d7b  #55 Cut these executors hard.
a5e8d7b is described below

commit a5e8d7b0b29e4229074054705956c695d0e732b8
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Fri Jul 10 13:38:20 2020 -0500

    #55 Cut these executors hard.
---
 .../solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
index cf76aa0..78c1aef 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
@@ -892,7 +892,8 @@ public class SolrZkClient implements Closeable {
   public void close() {
     if (isClosed) return; // it's okay if we over close - same as solrcore
     isClosed = true;
-
+    zkConnManagerCallbackExecutor.shutdownNow();
+    zkCallbackExecutor.shutdownNow();
     try (ParWork worker = new ParWork(this, true)) {
 
       worker.add("ZkClientExecutors&ConnMgr", zkCallbackExecutor, zkConnManagerCallbackExecutor, connManager, keeper);
@@ -1079,7 +1080,10 @@ public class SolrZkClient implements Closeable {
 
     @Override
     public void process(final WatchedEvent event) {
-      log.debug("Submitting job to respond to event {}", event);
+      if (isClosed) {
+        return;
+      }
+      if (log.isDebugEnabled()) log.debug("Submitting job to respond to event {}", event);
       try {
         if (watcher instanceof ConnectionManager) {
           zkConnManagerCallbackExecutor.submit(() -> watcher.process(event));