From 782ded2d7ab10f6eea0468a9b0e49a94b2ce6c0b Mon Sep 17 00:00:00 2001 From: Ishan Chattopadhyaya Date: Sun, 29 Mar 2020 07:20:32 +0530 Subject: [PATCH] SOLR-14317: HttpClusterStateProvider throws exception when only one node down (Closes #1342) --- solr/CHANGES.txt | 2 ++ .../solr/client/solrj/impl/BaseHttpClusterStateProvider.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index d85cc9e859b..b0fddbcab5c 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -96,6 +96,8 @@ Bug Fixes * SOLR-14302: Ensure Solr always includes the stacktrace for exceptions by using '-OmitStackTraceInFastThrow' (hossman) +* SOLR-14317: HttpClusterStateProvider throws exception when only one node down. (Lyle Wang via Ishan Chattopadhyaya) + Other Changes --------------------- * SOLR-14197: SolrResourceLoader: marked many methods as deprecated, and in some cases rerouted exiting logic to avoid diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java index 79a40c0a092..a50867c5501 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java @@ -63,7 +63,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid this.liveNodes = fetchLiveNodes(initialClient); liveNodesTimestamp = System.nanoTime(); break; - } catch (IOException e) { + } catch (SolrServerException | IOException e) { log.warn("Attempt to fetch cluster state from {} failed.", solrUrl, e); } }