dsmiley commented on code in PR #2571: URL: https://github.com/apache/solr/pull/2571#discussion_r1690370559
########## solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java: ########## @@ -1228,9 +1199,15 @@ protected DocCollection getDocCollection(String collection, Integer expectedVers if (col != null) { if (expectedVersion <= col.getZNodeVersion() && !cacheEntry.shouldRetry()) return col; } + // Moving the lookup inside the lock makes the lazy/non-lazy check irrelevant + ClusterState.CollectionRef ref = getCollectionRef(collection); + if (ref == null) { + // no such collection exists + return null; + } // We are going to fetch a new version // we MUST try to get a new version - DocCollection fetchedCol = ref.get(); // this is a call to ZK + DocCollection fetchedCol = ref.get(); // this is a call to ZK if CSP instance is a Zk CSP Review Comment: The ZK-ness isn't the point; the point is that a remote call is going to be made (expensive) -- 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