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.java index 4f0c3bb3836..659881033a9 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 @@ private void refreshLiveNodes(Watcher watcher) throws KeeperException, Interrupt } public void registerClusterPropertiesListener(ClusterPropertiesListener listener) { + log.debug("registerClusterPropertiesListener"); // fire it once with current properties if (listener.onChange(getClusterProperties())) { removeClusterPropertiesListener(listener); @@ -862,6 +863,7 @@ public void removeClusterPropertiesListener(ClusterPropertiesListener listener) } public void registerLiveNodesListener(LiveNodesListener listener) { + log.debug("registerLiveNodesListener"); // fire it once with current live nodes if (listener.onChange( new TreeSet<>(getClusterState().getLiveNodes()), @@ -1003,7 +1005,7 @@ public Replica getLeaderRetry(String collection, String shard, int timeout) 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; } @@ -1608,6 +1610,7 @@ public void registerCollectionStateWatcher( */ public void registerDocCollectionWatcher( String collection, DocCollectionWatcher docCollectionWatcher) { + log.debug("registerDocCollectionWatcher collection={}", collection); AtomicReference newWatcherRef = new AtomicReference<>(); collectionWatches.compute( collection, @@ -1664,7 +1667,7 @@ public void waitForState( 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; } } @@ -1746,7 +1749,7 @@ public DocCollection waitForState( 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; } }