You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/03/23 17:23:32 UTC

[GitHub] [lucene-solr] HoustonPutman commented on a change in pull request #1373: SOLR-14340 - ZkStateReader.readConfigName is doing too much work

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:
users@infra.apache.org


With regards,
Apache Git Services

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