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/28 01:32:06 UTC

[lucene-solr] branch reference_impl_dev created (now d117b6a)

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

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


      at d117b6a  @412 Try a couple tweaks in ZkTestServer shutdown.

This branch includes the following new commits:

     new d117b6a  @412 Try a couple tweaks in ZkTestServer shutdown.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[lucene-solr] 01/01: @412 Try a couple tweaks in ZkTestServer shutdown.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d117b6aebf3c8a48d885b766df649f99d554a50c
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 27 20:24:14 2020 -0500

    @412 Try a couple tweaks in ZkTestServer shutdown.
---
 .../java/org/apache/solr/cloud/ZkTestServer.java    | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java b/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java
index ad73f78..72a0e44 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java
@@ -399,12 +399,12 @@ public class ZkTestServer implements Closeable {
     //    if (zkDb != null) zkDb.clear();
         try (ParWork worker = new ParWork(this, true)) {
           worker.add("ZkTestInternals", () -> {
-                    cnxnFactory.shutdown();
-                    cnxnFactory.join();
-                    return cnxnFactory;
-                  }, ()->{
-            zooKeeperServer.shutdown(true);
-            return  zooKeeperServer;
+            zooKeeperServer.shutdown(false);
+            return zooKeeperServer;
+          }, () -> {
+            cnxnFactory.shutdown();
+            cnxnFactory.join();
+            return cnxnFactory;
           });
         }
       } finally {
@@ -523,7 +523,7 @@ public class ZkTestServer implements Closeable {
     zkServer.zooKeeperServer.setZKDatabase(zkDb);
   }
 
-  public void run() throws InterruptedException, IOException {
+  public synchronized void run() throws InterruptedException, IOException {
     run(false);
   }
 
@@ -608,6 +608,7 @@ public class ZkTestServer implements Closeable {
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
     } catch (InterruptedException e) {
       ParWork.propegateInterrupt(e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
     }
   }
 
@@ -622,7 +623,11 @@ public class ZkTestServer implements Closeable {
       ParWork.propegateInterrupt("Exception trying to print zk layout to log on shutdown", e);
     }
     if (zkMonitoringFile != null && chRootClient != null && zkServer != null) {
-      writeZkMonitorFile();
+      try {
+        writeZkMonitorFile();
+      } catch (Exception e2) {
+        ParWork.propegateInterrupt("Exception trying to write zk layout to file on shutdown", e2);
+      }
     }
 
    // zooThread.interrupt();