[ 
https://issues.apache.org/jira/browse/SOLR-9106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376659#comment-15376659
 ] 

Varun Thacker commented on SOLR-9106:
-------------------------------------

I think its okay to cache it .

We should maybe add some documentation that {{getClusterProperty}} might not 
always have a latest value if an update has just taken place and that in 
scenarios where we want the latest value we should forceRefresh it before 
reading.

So things like backup/restore can forceRefresh it since its a user facing API 
where the user can set some values in the cluster property file and expect it 
to be there. Things like the OverseerAutoReplicaFailoverThread where the 
feature might kick in after a couple of seconds because of this caching is fine.

> 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
>             Fix For: 6.1
>
>         Attachments: SOLR-9106.patch, 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]

Reply via email to