lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9199) ZkController#publishAndWaitForDownStates logic is inefficient
Date Thu, 09 Jun 2016 20:27:21 GMT

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

ASF subversion and git services commented on SOLR-9199:
-------------------------------------------------------

Commit 360d9c40da4cc1f86f080b4f2c7410da6fbc2195 in lucene-solr's branch refs/heads/branch_6x
from [~gchanan]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=360d9c4 ]

SOLR-9199: ZkController#publishAndWaitForDownStates logic is inefficient


> ZkController#publishAndWaitForDownStates logic is inefficient
> -------------------------------------------------------------
>
>                 Key: SOLR-9199
>                 URL: https://issues.apache.org/jira/browse/SOLR-9199
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hrishikesh Gadre
>            Assignee: Hrishikesh Gadre
>             Fix For: master (7.0), 6.2
>
>         Attachments: SOLR-9199.patch
>
>
> The following logic introduced as part of SOLR-8720 is inefficient. 
> https://github.com/apache/lucene-solr/blob/6c0331b8309603eaaf14b6677afba5ffe99f16a3/solr/core/src/java/org/apache/solr/cloud/ZkController.java#L687-L712
> Specifically,
> * foundStates flag is set to TRUE before the for loop.
> * In the for loop we check if any replica on this node is not in the DOWN state. If yes,
then foundStates = FALSE
> * If foundStates == TRUE then we break out of the loop and return.
> The problem here is that once foundStates is set to FALSE, it is never reset to TRUE.
Hence we end up spending the whole 60 secs iterating over the collections even though all
the replicas are marked as DOWN in later iterations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message