[
https://issues.apache.org/jira/browse/SOLR-9106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281863#comment-15281863
]
Scott Blum commented on SOLR-9106:
----------------------------------
LGTM if tests pass. One comment:
{code}
- public static boolean isLegacy(Map clusterProps) {
- return !"false".equals(clusterProps.get(ZkStateReader.LEGACY_CLOUD));
+ public static boolean isLegacy(ZkStateReader stateReader) {
+ return stateReader.getClusterProperty(ZkStateReader.LEGACY_CLOUD,
"false").equals("false") == false;
}
{code}
I think
!"false".equals(stateReader.getClusterProperty(ZkStateReader.LEGACY_CLOUD,
"false")) would be slightly more readable more like the original. That whole
"false").equals("false") == false bit makes my head spin LOL.
> Cache cluster properties in ZkStateReader
> -----------------------------------------
>
> Key: SOLR-9106
> URL: https://issues.apache.org/jira/browse/SOLR-9106
> Project: Solr
> Issue Type: Improvement
> Affects Versions: master (7.0)
> Reporter: Alan Woodward
> Assignee: Alan Woodward
> Attachments: SOLR-9106.patch
>
>
> ZkStateReader currently makes calls into ZK every time getClusterProps() is
> called. Instead we should keep the data locally and use a Watcher to update
> it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]