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

ASF subversion and git services commented on SOLR-11535:
--------------------------------------------------------

Commit 2b9d4c85dd58920df02317069805f4f5d3abb5c3 in solr's branch 
refs/heads/main from Michael Gibney
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=2b9d4c85dd5 ]

SOLR-11535: Fix race condition in singleton-per-collection StateWatcher 
creation (#1964)



> Weird behavior of CollectionStateWatcher
> ----------------------------------------
>
>                 Key: SOLR-11535
>                 URL: https://issues.apache.org/jira/browse/SOLR-11535
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 7.2, 8.0
>            Reporter: Andrzej Bialecki
>            Assignee: Michael Gibney
>            Priority: Major
>         Attachments: test.log
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> While working on SOLR-11320 I noticed a strange behavior in 
> {{ActiveReplicaWatcher}}, which is a subclass of {{CollectionStateWatcher}} - 
> it appears that its {{onStateChanged}} method can be called from multiple 
> threads with exactly the same {{DocCollection}} state, ie. unchanged between 
> the calls.
> This seems to run contrary to the javadoc, which implies that this method is 
> called only when the state actually changes, and it also doesn't mention 
> anything about the need for thread-safety in the method implementation.
> I attached the log, which has a lot of additional debugging - but the most 
> pertinent part being where a Watcher-s hashCode is printed together with the 
> {{DocCollection}} - notice that these overlapping calls both submit an 
> instance of {{DocCollection}} with the same zkVersion.
> [~dragonsinth], [~romseygeek] - could you please take a look at this? If this 
> behavior is expected then the javadoc should be updated to state clearly that 
> multiple calls can be made concurrently, with exactly the same state (which 
> is kind of a weak guarantee for a method called {{onStateChanged}} ;) ).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to