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

Varun Thacker updated SOLR-8804:
--------------------------------
    Attachment: SOLR-8804.patch

Thanks Shalin for the review! Updated patch taking into account your suggestions

> Race condition in ClusterStatus.getClusterStatus
> ------------------------------------------------
>
>                 Key: SOLR-8804
>                 URL: https://issues.apache.org/jira/browse/SOLR-8804
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 5.3.1
>            Reporter: Alexey Serba
>            Assignee: Varun Thacker
>            Priority: Trivial
>         Attachments: SOLR-8804.patch, SOLR-8804.patch
>
>
> Reading cluster state information using {{/collections?action=CLUSTERSTATUS}} 
> can fail if there's a concurrent {{/collections?action=DELETE}} operation.
> The code in {{ClusterStatus.getClusterStatus}} 
> # gets collection names
> # for every collection reads its cluster state info using 
> {{ClusterState.getCollection}}
> The problem is that if there's a {{DELETE}} operation in between then 
> {{ClusterState.getCollection}} can fail thus causing the whole operation to 
> fail. It seems that it would be better to call 
> {{ClusterState.getCollectionOrNull}} and skip/ignore that collection if the 
> result is null.
> {noformat}
> 19:49:32.479 [qtp1531448569-881] ERROR org.apache.solr.core.SolrCore - 
> org.apache.solr.common.SolrException: Could not find collection : collection
>     at 
> org.apache.solr.common.cloud.ClusterState.getCollection(ClusterState.java:165)
>     at 
> org.apache.solr.handler.admin.ClusterStatus.getClusterStatus(ClusterStatus.java:110)
>     at 
> org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation$19.call(CollectionsHandler.java:614)
>     at 
> org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:166)
> {noformat}



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

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

Reply via email to