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

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

Commit c4de198d059bf3951523107a52e1b45f20e4d103 in lucene-solr's branch 
refs/heads/branch_6_0 from [~thelabdude]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c4de198 ]

SOLR-8908: Fixed OnReconnect listener management in ZkController to allow for 
de-registering listeners.

Here's what this commit includes:
* Added the removeOnReconnectListener method to ZkController to allow 
OnReconnect listener implementations to de-register; avoids a memory leak
* Updated ZkIndexSchemaReader to add a CloseHook to the SolrCore it supports to 
de-register as an OnReconnect listener
* Added unit test to verify that after reloading and deleting a SolrCore in 
managed schema mode, the associated ZkIndexSchemaReader gets de-registered 
correctly


> Registering each ZkIndexSchemaReader as an OnReconnect listener introduces a 
> memory leak
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-8908
>                 URL: https://issues.apache.org/jira/browse/SOLR-8908
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 5.0, 5.1, 5.2, 5.2.1, 5.3, 5.3.1, 5.4, 5.4.1, 5.5
>            Reporter: Timothy Potter
>            Assignee: Timothy Potter
>              Labels: leak
>             Fix For: 5.5.1, 6.1
>
>
> As discovered by [~alexey], each ZkIndexSchemaReader registers as an 
> OnReconnect listener with the ZkController to get notified when the ZK 
> Session has been re-established. However, the ZkIndexSchemaReader is never 
> removed from the reconnectListeners list in ZkController when the core is 
> reloaded or removed. 
> Moreover, it also means that the same core is re-notified of the re-connect 
> more than once if it has been reloaded.
> This leads to a memory leak, which can become a real issue if you have a lot 
> of cores or do a lot of reloads of your cores.



--
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