[
https://issues.apache.org/jira/browse/SOLR-6844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Rowe updated SOLR-6844:
-----------------------------
Attachment: SOLR-6844.patch
Patch. Committing shortly.
> Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port, to
> .getSolrHostPort()
> ----------------------------------------------------------------------------------------------
>
> Key: SOLR-6844
> URL: https://issues.apache.org/jira/browse/SOLR-6844
> Project: Solr
> Issue Type: Bug
> Reporter: Steve Rowe
> Assignee: Steve Rowe
> Priority: Minor
> Attachments: SOLR-6844.patch
>
>
> [~makuk66] pointed out to me that it was suspicious that
> {{ConfigSolr.getZkHostPort()}} returns {{CfgProp.SOLR_HOSTPORT}}: the method
> claims to report the configured Zookeeper port, while it in fact returns the
> configured Solr port.
> The only place this method is called (outside of tests) is in
> {{ZkContainer.initZookeeper()}} when constructing a {{SolrZkServer}}
> instance: the value of {{ConfigSolr.getZkHostPort()}} is passed in for the
> {{solrPort}} param, which is stored by the ctor as the same-named instance
> variable, which is used in only one place: {{SolrZkServer.parseConfig()}},
> where the default value of the ZK port is set as the Solr port + 1000:
> {code:java}
> props = SolrZkServerProps.getProperties(confHome + '/' + "zoo.cfg");
> SolrZkServerProps.injectServers(props, zkRun, zkHost);
> zkProps.parseProperties(props);
> if (zkProps.getClientPortAddress() == null) {
> zkProps.setClientPort(Integer.parseInt(solrPort)+1000);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]