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/22 00:37:41 UTC

[lucene-solr] branch reference_impl updated: @276 Pull this interrupt back out.

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 19bde83  @276 Pull this interrupt back out.
19bde83 is described below

commit 19bde83683c2d4dfe5404e9273403ee64586c311
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 21 19:37:23 2020 -0500

    @276 Pull this interrupt back out.
---
 .../src/java/org/apache/solr/common/cloud/SolrZooKeeper.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java
index bd2b1e1..0296d26 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java
@@ -33,6 +33,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.solr.common.ParWork;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.util.CloseTracker;
 import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.SuppressForbidden;
 import org.apache.zookeeper.ClientCnxn;
@@ -46,14 +47,15 @@ import org.apache.zookeeper.proto.RequestHeader;
 @SuppressWarnings({"try"})
 public class SolrZooKeeper extends ZooKeeper {
   final Set<Thread> spawnedThreads = ConcurrentHashMap.newKeySet();
-  
+  private final CloseTracker closeTracker;
+
   // for test debug
   //static Map<SolrZooKeeper,Exception> clients = new ConcurrentHashMap<SolrZooKeeper,Exception>();
 
   public SolrZooKeeper(String connectString, int sessionTimeout,
       Watcher watcher) throws IOException {
     super(connectString, sessionTimeout, watcher);
-
+    closeTracker = new CloseTracker();
     //clients.put(this, new RuntimeException());
   }
   
@@ -108,12 +110,12 @@ public class SolrZooKeeper extends ZooKeeper {
   
   @Override
   public void close() {
-
+    closeTracker.close();
     try (ParWork worker = new ParWork(this, true)) {
       worker.collect(() -> {
         try {
           ZooKeeperExposed exposed = new ZooKeeperExposed(this, cnxn);
-          exposed.intteruptSendThread();
+          //exposed.intteruptSendThread();
 //        exposed.intteruptSendThread();
           SolrZooKeeper.super.close();
         } catch (InterruptedException e) {