Apache Solr open-source search software
Logging: ZkStateReader.getLeaderRetry to TRACE (#4696)
David Smiley4cfcb3297264
diff --git a/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.javaindex 0f9095a3737..81ddf93b26c 100644--- a/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java+++ b/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java@@ -849,6 +849,7 @@ public class ZkStateReader implements SolrCloseable {}public void registerClusterPropertiesListener(ClusterPropertiesListener listener) {+ log.debug("registerClusterPropertiesListener");// fire it once with current propertiesif (listener.onChange(getClusterProperties())) {removeClusterPropertiesListener(listener);@@ -862,6 +863,7 @@ public class ZkStateReader implements SolrCloseable {}public void registerLiveNodesListener(LiveNodesListener listener) {+ log.debug("registerLiveNodesListener");// fire it once with current live nodesif (listener.onChange(new TreeSet<>(getClusterState().getLiveNodes()),@@ -1003,7 +1005,7 @@ public class ZkStateReader implements SolrCloseable {if (c == null) return false;Replica l = getLeader(n, c, shard);if (l != null) {- log.debug("leader found for {}/{} to be {}", collection, shard, l);+ log.trace("leader found for {}/{} to be {}", collection, shard, l);leader.set(l);return true;}@@ -1598,6 +1600,7 @@ public class ZkStateReader implements SolrCloseable {*/public void registerDocCollectionWatcher(String collection, DocCollectionWatcher docCollectionWatcher) {+ log.debug("registerDocCollectionWatcher collection={}", collection);AtomicReference<StateWatcher> newWatcherRef = new AtomicReference<>();collectionWatches.compute(collection,@@ -1654,7 +1657,7 @@ public class ZkStateReader implements SolrCloseable {DocCollection docCollection = clusterState.getCollectionOrNull(collection);if (liveNodes != null && docCollection != null) {if (predicate.matches(liveNodes, docCollection)) {- log.debug("Found {} directly in clusterState", predicate);+ log.trace("waitForState collection={}: cache hit in clusterState", collection);return;}}@@ -1736,7 +1739,7 @@ public class ZkStateReader implements SolrCloseable {DocCollection docCollection = clusterState.getCollectionOrNull(collection);if (docCollection != null) {if (predicate.test(docCollection)) {- log.debug("Found {} directly in clusterState", predicate);+ log.trace("waitForState collection={}: cache hit in clusterState", collection);return docCollection;}}