HoustonPutman commented on a change in pull request #1373: SOLR-14340 - 
ZkStateReader.readConfigName is doing too much work
URL: https://github.com/apache/lucene-solr/pull/1373#discussion_r396618718
 
 

 ##########
 File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
 ##########
 @@ -294,10 +294,6 @@ public String readConfigName(String collection) throws 
KeeperException {
     log.debug("Loading collection config from: [{}]", path);
 
     try {
-      if (zkClient.exists(path, true) == false) {
-        log.warn("No collection found at path {}.", path);
-        throw new KeeperException.NoNodeException("No collection found at 
path: " + path);
-      }
       byte[] data = zkClient.getData(path, null, null, true);
 
 Review comment:
   Small thing, without the check above this will throw a NoNodeException if 
the path doesn't exist. Maybe this can be wrapped in a try/catch just for the 
NoNodeException, so that the more user-friendly message used above can be 
thrown instead:
   
   `throw new KeeperException.NoNodeException("No collection found at path: " + 
path);`
   
   Just a thought, I'm not even sure it's worth it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to