You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2020/08/13 23:35:27 UTC
[lucene-solr] branch branch_8x updated: SOLR-14751: Zookeeper Admin
screen not working for old ZK versions
This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 024f0ee SOLR-14751: Zookeeper Admin screen not working for old ZK versions
024f0ee is described below
commit 024f0ee9cba6f6f4a2335ea38340f0df90104955
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Fri Aug 14 01:32:28 2020 +0200
SOLR-14751: Zookeeper Admin screen not working for old ZK versions
(cherry picked from commit bed3b8fbfbc5a2e35e987040ec8fbce1df0988bd)
---
solr/CHANGES.txt | 2 ++
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java | 3 +++
2 files changed, 5 insertions(+)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9ef0c49..72280e7 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -70,6 +70,8 @@ Bug Fixes
* SOLR-14748: Fix incorrect auth/SSL startup logging (Jason Gerlowski)
+* SOLR-14751: Zookeeper Admin screen not working for old ZK versions (janhoy)
+
Other Changes
---------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
index 897ae26..9b1101e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
@@ -773,6 +773,9 @@ public class SolrZkClient implements Closeable {
return "";
}
return new String(data, StandardCharsets.UTF_8);
+ } catch (NoNodeException nne) {
+ log.debug("Zookeeper does not have the /zookeeper/config znode, assuming old ZK version");
+ return "";
} catch (KeeperException|InterruptedException ex) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Failed to get config from zookeeper", ex);
}