[
https://issues.apache.org/jira/browse/SOLR-9181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alan Woodward updated SOLR-9181:
--------------------------------
Attachment: SOLR-9181.patch
Turns out that ZkStateReaderTest is very helpful for finding bugs and races in
the collection state watcher implementation! This patch fixes the following:
* notifications were being run before constructState() was called, which meant
that threads waiting on notifications could see stale state if they then called
.getClusterState(). Notifications are now always run afterwards.
* DocCollection.equals() didn't take into account state formats, so a migration
from state format 1 to state format 2 could sometimes not fire a notification
* When choosing which state format 1 collections should be notified, the code
checked to see if there was a watcher on the collection. This lead to a race,
where a watch could be set after the legacy state change had fired, but before
constructState() was called, so that it would check against stale state but not
be notified of the new state. The code now just raises notifications for all
changed collections.
Beasting ZkStateReaderTest for several thousand iterations now passes
consistently, so I think this should sort out the issues. I'm pretty sure that
the final point above is also the reason for the failures in SOLR-9189.
> ZkStateReaderTest failure
> -------------------------
>
> Key: SOLR-9181
> URL: https://issues.apache.org/jira/browse/SOLR-9181
> Project: Solr
> Issue Type: Bug
> Reporter: Alan Woodward
> Assignee: Alan Woodward
> Fix For: 6.1
>
> Attachments: SOLR-9181.patch, SOLR-9181.patch
>
>
> https://builds.apache.org/job/Lucene-Solr-Tests-6.x/243/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]