[ 
https://issues.apache.org/jira/browse/SOLR-16633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Noble Paul updated SOLR-16633:
------------------------------
    Description: 
If {{retryOnConnLoss=true}} is passed to 
[SolrZkClient.getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
 and there is a failure, it will wait for a certain amount of time irrespective 
of the amount of time the caller is willing to wait. This means that methods 
such as [ZkStateReadert.waitForState() 
|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java#L1933]
 cannot honour the {{wait}} parameter.

The solution is to add timeout support to 
[getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
 and 
[ZkCmdExecutor.retryOperation()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java#L61]

  was:
If {{retryOnConnLoss=true}} is passed to[ 
SolrZkClient.getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
 and there is a failure, it will wait for a certain amount of time irrespective 
of the amount of time the caller is willing to wait. This means that methods 
such as [ZkStateReadert.waitForState() 
|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java#L1933]
 cannot honour the {{wait}} parameter.

The solution is to add timeout support to 
[getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
 and 
[ZkCmdExecutor.retryOperation()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java#L61]


> SolrZkClient read with retry operations should support timeout
> --------------------------------------------------------------
>
>                 Key: SOLR-16633
>                 URL: https://issues.apache.org/jira/browse/SOLR-16633
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>            Priority: Major
>
> If {{retryOnConnLoss=true}} is passed to 
> [SolrZkClient.getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
>  and there is a failure, it will wait for a certain amount of time 
> irrespective of the amount of time the caller is willing to wait. This means 
> that methods such as [ZkStateReadert.waitForState() 
> |https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java#L1933]
>  cannot honour the {{wait}} parameter.
> The solution is to add timeout support to 
> [getData()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java#L427]
>  and 
> [ZkCmdExecutor.retryOperation()|https://github.com/apache/solr/blob/0725a9ba853c1a0caacd7c2c037cbe11bd4b4b39/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java#L61]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to