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/09/02 14:46:26 UTC

[lucene-solr] branch reference_impl_dev updated: @708 Bring back a few test methods.

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


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new b8487fb  @708 Bring back a few test methods.
b8487fb is described below

commit b8487fb72c135b0ac655e449131371cd8e4d60a7
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Wed Sep 2 09:46:03 2020 -0500

    @708 Bring back a few test methods.
---
 .../org/apache/solr/cloud/DeleteReplicaTest.java   | 14 +++++-----
 .../apache/solr/common/cloud/ZkStateReader.java    | 30 ++++++++++++++--------
 2 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
index 659d03e..65fabc5 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
@@ -90,7 +90,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   }
 
   @Test
-  @Ignore // nocommit debug
+  @Ignore // nocommit: investigate
   // commented out on: 01-Apr-2019   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018
   public void deleteLiveReplicaTest() throws Exception {
 
@@ -147,7 +147,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   }
 
   @Test
-  @Ignore // nocommit debug
+  @Ignore // nocommit: investigate
   public void deleteReplicaAndVerifyDirectoryCleanup() throws Exception {
 
     final String collectionName = "deletereplica_test";
@@ -173,7 +173,6 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   }
 
   @Test
-  @Ignore // nocommit debug
   public void deleteReplicaByCount() throws Exception {
 
     final String collectionName = "deleteByCount";
@@ -205,14 +204,14 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   }
 
   @Test
-  @Ignore // nocommit debug
+  @Ignore // nocommit: investigate
   public void deleteReplicaFromClusterState() throws Exception {
     deleteReplicaFromClusterState("false");
     CollectionAdminRequest.setClusterProperty(ZkStateReader.LEGACY_CLOUD, null).process(cluster.getSolrClient());
   }
   
   @Test
-  @Ignore // nocommit debug
+  @Ignore // nocommit: investigate
   public void deleteReplicaFromClusterStateLegacy() throws Exception {
     deleteReplicaFromClusterState("true"); 
     CollectionAdminRequest.setClusterProperty(ZkStateReader.LEGACY_CLOUD, null).process(cluster.getSolrClient());
@@ -274,7 +273,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
 
   @Test
   @Slow
-  @Ignore // nocommit debug
+  @Ignore // nocommit: investigate
   // commented out on: 17-Feb-2019   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018
   public void raceConditionOnDeleteAndRegisterReplica() throws Exception {
     raceConditionOnDeleteAndRegisterReplica("false");
@@ -283,8 +282,8 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   
   @Test
   @Slow
+  @Ignore // nocommit: investigate
   // commented out on: 17-Feb-2019   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018
-  @Ignore // nocommit debug
   public void raceConditionOnDeleteAndRegisterReplicaLegacy() throws Exception {
     raceConditionOnDeleteAndRegisterReplica("true");
     CollectionAdminRequest.setClusterProperty(ZkStateReader.LEGACY_CLOUD, null).process(cluster.getSolrClient());
@@ -414,7 +413,6 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
   }
 
   @Test
-  @Ignore // nocommit debug
   public void deleteReplicaOnIndexing() throws Exception {
     final String collectionName = "deleteReplicaOnIndexing";
     CollectionAdminRequest.createCollection(collectionName, "conf", 1, 2)
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 38fa54d..7ddb17c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -152,6 +152,7 @@ public class ZkStateReader implements SolrCloseable {
   private static final String SOLR_ENVIRONMENT = "environment";
 
   public static final String REPLICA_TYPE = "type";
+  public static final byte[] EMPTY_ARRAY = new byte[0];
   private final CloseTracker closeTracker;
 
   /**
@@ -419,8 +420,10 @@ public class ZkStateReader implements SolrCloseable {
             }
           } catch (KeeperException e) {
             SolrException.log(log, e);
+            return;
           } catch (InterruptedException e) {
-            ParWork.propegateInterrupt(e);
+            log.warn("", e);
+            return;
           }
         }
 
@@ -437,14 +440,16 @@ public class ZkStateReader implements SolrCloseable {
           }
           log.info("Done waiting on latch");
         } catch (InterruptedException e) {
-          ParWork.propegateInterrupt(e);
+          log.warn("", e);
+          return;
         }
       }
 
     } catch (KeeperException e) {
-      throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, e);
+      log.warn("", e);
+      return;
     } catch (InterruptedException e) {
-      ParWork.propegateInterrupt(e);
+      log.warn("", e);
       return;
     }
 
@@ -473,19 +478,21 @@ public class ZkStateReader implements SolrCloseable {
         securityData = getSecurityProps(true);
       }
     } catch (Exception e) {
-      ParWork.propegateInterrupt(e);
-      throw new SolrException(ErrorCode.SERVER_ERROR, e);
+      log.warn("", e);
+      return;
     }
 
     collectionPropsObservers.forEach((c, v) -> {
       Stat stat = new Stat();
-      byte[] data = new byte[0];
+      byte[] data = EMPTY_ARRAY;
       try {
         data = zkClient.getData(getCollectionPropsPath(c), new PropsWatcher(c), stat);
       } catch (KeeperException e) {
         log.error("KeeperException", e);
+        return;
       } catch (InterruptedException e) {
-        ParWork.propegateInterrupt(e);
+        log.warn("", e);
+        return;
       }
 
       VersionedCollectionProps props = new VersionedCollectionProps(stat.getVersion(), (Map<String,String>) fromJSON(data));
@@ -520,17 +527,18 @@ public class ZkStateReader implements SolrCloseable {
                 try {
                   callback.call(new Pair<>(data, stat));
                 } catch (Exception e) {
-                  ParWork.propegateInterrupt(e);
                   log.error("Error running collections node listener", e);
+                  return;
                 }
               }
             } catch (KeeperException e) {
               log.error("A ZK error has occurred", e);
+              return;
             } catch (InterruptedException e) {
-              ParWork.propegateInterrupt(e);
+              log.warn("", e);
+              return;
             }
           }
-
         });
   }