You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2019/02/10 16:17:00 UTC

[jira] [Commented] (SOLR-13239) CollectionStateWatcher reports new collections before they really exist

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

Erick Erickson commented on SOLR-13239:
---------------------------------------

I wonder if some of the test failures are related?

> CollectionStateWatcher reports new collections before they really exist
> -----------------------------------------------------------------------
>
>                 Key: SOLR-13239
>                 URL: https://issues.apache.org/jira/browse/SOLR-13239
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java
>    Affects Versions: 7.6
>            Reporter: Hendrik Haddorp
>            Priority: Major
>
> A CollectionStateWatcher registered via org.apache.solr.common.cloud.ZkStateReader.registerCloudCollectionsListener gets invoked as soon as the CloudSolrClient detects a new collection. This is based on having a watch on the /collections znode. When the CollectionStateWatcher tries to read out information about the new collection via zkStateReader.getClusterState() there is a good chance that no DocCollection can be found. The reason for that is that a DocCollection is based on the state.json below the collection. As this znode is below the collection znode it does need to be created a bit later. So there is a race condition.
> One can run into the same problem if one tries to register a CollectionStateWatcher via ZkStateReader.registerCollectionStateWatcher straight after a new collection is found. The watcher is then being invoked with the DocCollection set to null as it also can not find the DocCollection object. Null does however indicate that the collection was being deleted.
> see also the mail thread about this:
> https://www.mail-archive.com/search?l=solr-user@lucene.apache.org&q=subject:%22Re%5C%3A+CloudSolrClient+getDocCollection%22&o=newest&f=1



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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