Alexey Serba created SOLR-9471:
----------------------------------

             Summary: Another race condition in ClusterStatus.getClusterStatus
                 Key: SOLR-9471
                 URL: https://issues.apache.org/jira/browse/SOLR-9471
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
    Affects Versions: 6.1
            Reporter: Alexey Serba
            Priority: Minor


Reading cluster state information using {{/collections?action=CLUSTERSTATUS}} 
can fail if there's a concurrent deletion of a collection with its configset.

The code in {{ClusterStatus.getClusterStatus}}
* gets collection names
* for every collection reads its "config name" from Zk

The problem is that if there's a concurrent delete operation for a collection 
and its configset in between then {{ClusterState.getCollection}} can fail thus 
causing the whole operation to fail. It seems that it would be better to catch 
Zk's {{NoNodeException}} for this particular case and handle it somehow (can we 
ignore this collection right away or should we re-check?)

{noformat}
Error loading config name for collection test (500)  Trace: 
org.apache.solr.common.SolrException: Error loading config name for collection 
test
        at 
org.apache.solr.common.cloud.ZkStateReader.readConfigName(ZkStateReader.java:196)
        at 
org.apache.solr.handler.admin.ClusterStatus.getClusterStatus(ClusterStatus.java:141)
        at 
org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation$21.call(CollectionsHandler.java:695)
...
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: 
KeeperErrorCode = NoNode for /collections/test
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1155)
        at 
org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:348)
        at 
org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:345)
        at 
org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:60)
        at 
org.apache.solr.common.cloud.SolrZkClient.getData(SolrZkClient.java:345)
        at 
org.apache.solr.common.cloud.ZkStateReader.readConfigName(ZkStateReader.java:178)
        ... 32 more
{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