[
https://issues.apache.org/jira/browse/SOLR-13393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815789#comment-16815789
]
ASF subversion and git services commented on SOLR-13393:
--------------------------------------------------------
Commit 980fd7d5c56349570b2202dedcf7b454216a61b8 in lucene-solr's branch
refs/heads/master from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=980fd7d ]
SOLR-13393: Fixed ZkClientClusterStateProvider to prevent risk of leaking
ZkStateReader/threads when processing concurrent requests during shutdown.
This primarily affected tests, but may have also caused odd errors/delays when
restart/shutting down solr nodes.
> ZkClientClusterStateProvider can leak ZkStateReader (and associated watcher
> threads) if background threads attempt to use it after close() .
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-13393
> URL: https://issues.apache.org/jira/browse/SOLR-13393
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Hoss Man
> Assignee: Hoss Man
> Priority: Major
> Attachments: SOLR-13393.patch, SOLR-13393.patch, SOLR-13393.patch
>
>
> while digging into some test failures related to leaked ZkStateReader
> objects, i noticed a pattern which i beleive can be explained by the fact
> that ZkClientClusterStateProvider does not complain/fail if some caller tries
> to connect()/use it after it's already been closed – in this situation it
> will just re-create a new ZkStateReader (which is later leaked)
> So in in situations where background/timer threads use a
> SolrClientCloudManager/ZkClientClusterStateProvider, we might see...
> {noformat}
> T1 : start shutdown...
> T1 : ...SolrClientCloudManager.close()...
> T1 : ...ZkClientClusterStateProvider.close()...
> T1 : ...ZkStateReader.close()
> T1 : ...zkStateReader = null;
> T 2: run background thread/task/trigger...
> T 2: ...get ZkClientClusterStateProvider
> T 2: ...call ZkClientClusterStateProvider.connect()
> T 2: ...zkStateReader = new ZkStateReader() /* LEAKED */
> T 2: ... do something with ZkClientClusterStateProvider
> T 2: ...finish background thread/task/trigger
> T1 : ...finish shutdown of ZkClientClusterStateProvider /
> SolrClientCloudManager
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]