Apache Lucene open-source search software
SOLR-6677: part 3, moving some more to DEBUG. Only printing "Updated live nodes from ZooKeeper..." if there was actually a change
Jan Høydahl0eaa85f696a7
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.javaindex dfb580da622..16b7fcd8b4b 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java@@ -136,7 +136,7 @@ public class ConnectionManager implements Watcher {}do {- // This loop will break iff a valid connection is made. If a connection is not made then it will repeat and+ // This loop will break if a valid connection is made. If a connection is not made then it will repeat and// try again to create a new connection.try {connectionStrategy.reconnect(zkServerAddress,@@ -232,7 +232,7 @@ public class ConnectionManager implements Watcher {if (!connected) {throw new TimeoutException("Could not connect to ZooKeeper " + zkServerAddress + " within " + waitForConnection + " ms");}- log.info("Client is connected to ZooKeeper");+ log.debug("Client is connected to ZooKeeper");}public synchronized void waitForDisconnected(long timeout)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 7181d7049ed..a858f340f6b 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@@ -368,7 +368,7 @@ public class ZkStateReader implements Closeable {InterruptedException {// We need to fetch the current cluster state and the set of live nodes- LOG.info("Updating cluster state from ZooKeeper... ");+ LOG.debug("Updating cluster state from ZooKeeper... ");// Sanity check ZK structure.if (!zkClient.exists(CLUSTER_STATE, true)) {@@ -397,7 +397,7 @@ public class ZkStateReader implements Closeable {}try {synchronized (ZkStateReader.this.getUpdateLock()) {- LOG.info("Updating aliases... ");+ LOG.debug("Updating aliases... ");// remake watchfinal Watcher thisWatch = this;@@ -447,7 +447,7 @@ public class ZkStateReader implements Closeable {}try {synchronized (ZkStateReader.this.getUpdateLock()) {- LOG.info("Updating [{}] ... ", SOLR_SECURITY_CONF_PATH);+ LOG.debug("Updating [{}] ... ", SOLR_SECURITY_CONF_PATH);// remake watchfinal Watcher thisWatch = this;@@ -683,7 +683,9 @@ public class ZkStateReader implements Closeable {clusterState.setLiveNodes(newLiveNodes);}}- LOG.info("Updated live nodes from ZooKeeper... ({}) -> ({})", oldLiveNodes.size(), newLiveNodes.size());+ if (oldLiveNodes.size() != newLiveNodes.size()) {+ LOG.info("Updated live nodes from ZooKeeper... ({}) -> ({})", oldLiveNodes.size(), newLiveNodes.size());+ }if (LOG.isDebugEnabled()) {LOG.debug("Updated live nodes from ZooKeeper... {} -> {}", new TreeSet<>(oldLiveNodes), new TreeSet<>(newLiveNodes));}