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/07/29 07:37:33 UTC

[GitHub] [lucene-solr] janhoy commented on a change in pull request #1701: SOLR-14671: Parsing dynamic ZK config sometimes cause NuberFormatException

janhoy commented on a change in pull request #1701:
URL: https://github.com/apache/lucene-solr/pull/1701#discussion_r461461015



##########
File path: solr/core/src/java/org/apache/solr/handler/admin/ZookeeperStatusHandler.java
##########
@@ -112,15 +112,21 @@ public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throw
           .map(h -> h.resolveClientPortAddress() + ":" + h.clientPort)
           .sorted().collect(Collectors.toList());
       List<String> dynamicHosts = zkDynamicConfig.getServers().stream()
-          .map(h -> h.resolveClientPortAddress() + ":" + h.clientPort)
+          .map(h -> h.resolveClientPortAddress() + ":" + (h.clientPort != null ? h.clientPort : "2181"))

Review comment:
       This is not bullet proof if e.g. user has `clientPort=1234` in `zoo.cfg` and in zkHost connection string. Then we'll add a warning that dynamic config differs from zkHost, which is not entirely true since we just lack the port part. We have no way from client to read the `clientPort` from server except from connecting to the server with 4LW *ont the clientPort* which is a chicken and egg. This hack will make the comparison work for default port, which is a compromise.




----------------------------------------------------------------
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



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