psalagnac commented on code in PR #1945: URL: https://github.com/apache/solr/pull/1945#discussion_r1340250228
########## solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java: ########## @@ -1802,6 +1800,18 @@ public void waitForState( throw new AlreadyClosedException(); } + // Check predicate against known clusterState before trying to add watchers + if (clusterState != null) { + Set<String> liveNodes = clusterState.getLiveNodes(); + DocCollection docCollection = clusterState.getCollectionOrNull(collection); + if (liveNodes != null && docCollection != null) { + if (predicate.matches(liveNodes, docCollection)) { + log.debug("Found {} directly in clusterState", predicate); Review Comment: Probably the `toString()` output of the predicate won't be relevant most of the time. I'm not sure what is the usual practice in Solr for this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org