You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2015/11/09 11:46:11 UTC

[jira] [Updated] (SOLR-8255) MiniSolrCloudCluster doesn't use a thread-safe list for its jetties

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

Alan Woodward updated SOLR-8255:
--------------------------------
    Description: 
MiniSolrCloudCluster uses a LinkedList<> to hold its jetties.  However, multi-threaded startup can break this because the list isn't thread safe.  We should use CopyOnWriteArrayList instead.

See for example http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/14819/, which starts up 5 nodes but then only has 4 entries in its jetty list, causing assertion errors and thread leaks.

  was:MiniSolrCloudCluster waits until it has seen all its servers appear in the cluster live nodes list before its constructor returns.  However, a node can appear in this list before jetty.start() has returned, so in particularly slow cases the cluster constructor will return before this jetty has been added to its internal list.  This can lead to test failures like http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/14819/, where the assertion on TestMiniSolrClusterCluster line 120 fails because the jettys list doesn't include the slow-starting node.  It also means that the slow starter doesn't get shut down properly, because shutdown() is called before the slow node is added to the list of nodes to close.

        Summary: MiniSolrCloudCluster doesn't use a thread-safe list for its jetties  (was: MiniSolrCloudCluster can return before all its jetties are ready)

> MiniSolrCloudCluster doesn't use a thread-safe list for its jetties
> -------------------------------------------------------------------
>
>                 Key: SOLR-8255
>                 URL: https://issues.apache.org/jira/browse/SOLR-8255
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>
> MiniSolrCloudCluster uses a LinkedList<> to hold its jetties.  However, multi-threaded startup can break this because the list isn't thread safe.  We should use CopyOnWriteArrayList instead.
> See for example http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/14819/, which starts up 5 nodes but then only has 4 entries in its jetty list, causing assertion errors and thread leaks.



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

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