Apache Lucene open-source search software
SOLR-5255: Remove unnecessary call to fetch and watch live nodes in ZkStateReader cluster watcher
Shalin Shekhar Mangar2b1bea8279de
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex acb2a00edb0..658fb9a55a7 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -103,6 +103,9 @@ Bug Fixes* SOLR-5301: DELETEALIAS command prints CREATEALIAS in logs (janhoy)+* SOLR-5255: Remove unnecessary call to fetch and watch live nodes in ZkStateReader+ cluster watcher. (Jessica Cheng via shalin)+Security----------------------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.javaindex 356f14b9b95..f606599ca50 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@@ -218,11 +218,6 @@ public class ZkStateReader {Stat stat = new Stat();byte[] data = zkClient.getData(CLUSTER_STATE, thisWatch, stat ,true);- List<String> liveNodes = zkClient.getChildren(- LIVE_NODES_ZKNODE, this, true);-- Set<String> liveNodesSet = new HashSet<String>();- liveNodesSet.addAll(liveNodes);Set<String> ln = ZkStateReader.this.clusterState.getLiveNodes();ClusterState clusterState = ClusterState.load(stat.getVersion(), data, ln);// update volatile