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

Shalin Shekhar Mangar updated SOLR-2927:
----------------------------------------
    Attachment: SOLR-2927.patch

I still see two mbeans leaked after moving infoRegistry.clear after the 
executor has been shutdown and the searcher is closed. 

The reason is that two components, MLTQParserPlugin and NestedQParserPlugin, 
use the same key name as QueryComponent and MLTComponent respectively while 
registering themselves. JMX is perfectly fine accepting mbeans with the same 
key because we use the key as the "type" and the mbean name (usually the class 
name) as the mbean "id" (it should have been the other way around but I didn't 
know enough about JMX when I wrote the original impl) but the map loses track 
of these mbeans and doesn't un-register them. We can't change the name of these 
parsers because it breaks back-compat.

In this patch, I used Cyrille's suggestion to move the clear after searcher is 
shutdown. I also use a JMX query to get all registered mbeans and un-register 
them. This gets rid of all leaks.

> SolrIndexSearcher's register do not match close and SolrCore's closeSearcher
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-2927
>                 URL: https://issues.apache.org/jira/browse/SOLR-2927
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.0-ALPHA
>         Environment: JDK1.6/CentOS
>            Reporter: tom liu
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 4.9, Trunk
>
>         Attachments: SOLR-2927.patch, SOLR-2927.patch, mbean-leak-jira.png
>
>
> # SolrIndexSearcher's register method put the name of searcher, but 
> SolrCore's closeSearcher method remove name of currentSearcher on 
> infoRegistry.
> # SolrIndexSearcher's register method put the name of cache, but 
> SolrIndexSearcher's close do not remove the name of cache.
> so, there maybe lost some memory leak.



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

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

Reply via email to