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/07 13:45:47 UTC

[lucene-solr] branch reference_impl_dev updated: @775 Don't throw exceptions to no one.

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 c997994  @775 Don't throw exceptions to no one.
c997994 is described below

commit c997994d78d687bf5ca77c68381b06eb6c406767
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Sep 7 08:45:32 2020 -0500

    @775 Don't throw exceptions to no one.
---
 .../apache/solr/cloud/api/collections/AddReplicaCmd.java   | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
index cfaa8e0..5584fae 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
@@ -198,10 +198,11 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
       try {
         shardRequestTracker.processResponses(results, shardHandler, true, "ADDREPLICA failed to create replica");
       } catch (KeeperException e) {
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "ZooKeeper exception", e);
+        log.error("ZooKeeper exception", e);
+        return;
       } catch (InterruptedException e) {
-        ParWork.propegateInterrupt(e);
-        throw new SolrException(SolrException.ErrorCode.SERVICE_UNAVAILABLE, "Interrupted", e);
+        log.error("Interrupted", e);
+        return;
       }
 
       if (asyncId != null) {
@@ -232,10 +233,11 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
             return false;
           });
         } catch (InterruptedException e) {
-          ParWork.propegateInterrupt(e);
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+          log.error("Interrupted", e);
+          return;
         } catch (TimeoutException e) {
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+          log.error("Timeout", e);
+          return;
         }
       }