You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Anver Sotnikov <as...@gmail.com> on 2020/10/15 19:23:06 UTC
Potential memory leak on ReplicationHandler
Hi,
I seem to experience a memory leak on my Solr Cloud cluster with 3 TLOG
machines.
Followers in this configuration get ReplicationHandlers reloaded - old
ReplicationHandler would be shut down and new one created and registered.
As part of registration ReplicationHandler is added to SolrCore closeHooks.
Old ReplicationHandler gets shut down BUT it is not removed from SolrCore
closeHooks.
Overtime with core reloads happening we collect a lot of
ReplicationHandlers (~100) in SolrCore.closeHooks.
Some code references
Core Reloaded:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/CoreContainer.java#L1661-L1670
StartReplication:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/ReplicateFromLeader.java#L91-L109
This code above calls ReplicationHandler.inform
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java#L1235
which registers handler in closeHooks of SolrCore
While
StopReplication:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/ReplicateFromLeader.java#L134-L139
does not remove ReplicationHandler from closeHooks
Thank you.
PS: Instructions to create an issue in Apache JIRA suggest I should check
the distribution list first for validation :)