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

Alan Woodward updated SOLR-8323:
--------------------------------
    Attachment: SOLR-8323.patch

Thanks for the review, Scott!  Here's an update patch.

bq. Why is DocCollection.isFullyActive() static?

Because the DocCollection passed to onStateChanged() may be null if the 
collection doesn't exist, or has been deleted.

bq. If waitForState() exits with the TimeoutException, the watcher never gets 
removed.

Fixed.

bq. Basically, you want to call notifyStateWatchers() from within 
updateWatchedCollection() exactly at the 3 points we're emitting log messages

Done, thanks - that's considerably simpler.

bq. There is a fundamental problem with how interestingCollections is getting 
managed now

I've restructured this entirely.  Watches keep track of a) how many cores they 
have interested in them, and b) how many state watchers there are.  Changes to 
a CollectionWatch state are always done inside a ConcurrentHashMap.compute() 
method to keep them atomic.  This simplifies the watch handling in ZKController 
as well, and removes the abstraction leak where external objects controlled 
when to remove watches.

> Add CollectionWatcher API to ZkStateReader
> ------------------------------------------
>
>                 Key: SOLR-8323
>                 URL: https://issues.apache.org/jira/browse/SOLR-8323
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: master
>            Reporter: Alan Woodward
>         Attachments: SOLR-8323.patch, SOLR-8323.patch, SOLR-8323.patch
>
>
> An API to watch for changes to collection state would be a generally useful 
> thing, both internally and for client use.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to