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 2016/09/27 10:43:14 UTC

lucene-solr:master: SOLR-6677: part 3, moving some more to DEBUG. Only printing "Updated live nodes from ZooKeeper..." if there was actually a change

Repository: lucene-solr
Updated Branches:
  refs/heads/master 8046fe29e -> 0eaa85f69


SOLR-6677: part 3, moving some more to DEBUG. Only printing "Updated live nodes from ZooKeeper..." if there was actually a change


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0eaa85f6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0eaa85f6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0eaa85f6

Branch: refs/heads/master
Commit: 0eaa85f696a7ea7e3752763e179d9bdde98dff3e
Parents: 8046fe2
Author: Jan H�ydahl <ja...@apache.org>
Authored: Tue Sep 27 12:43:04 2016 +0200
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Tue Sep 27 12:43:04 2016 +0200

----------------------------------------------------------------------
 .../org/apache/solr/common/cloud/ConnectionManager.java   |  4 ++--
 .../java/org/apache/solr/common/cloud/ZkStateReader.java  | 10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0eaa85f6/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
----------------------------------------------------------------------
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.java
index dfb580d..16b7fcd 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)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0eaa85f6/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
----------------------------------------------------------------------
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.java
index 7181d70..a858f34 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 watch
                   final 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 watch
                 final 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));
     }