Hi All,

We are using solr-9.1.0 and corresponding solr lucene library.
We are facing issue SolrZkClient not being closed and removed after closing 
Solr cloud connection.

We have requirenment to hot swap solr collection to different cluster.
To achieve this we are closing current Solrcloud connection and creating new 
one with new config that will connect to different cluster.
But looking at visulvm it seems that old SolrZkClient is still available in 
memory which is causing memory leak.


This is our implementation to close connection.

public void close() throws Exception {
    SolrClient solrClient;
    for(Iterator var1 = this.solrTemplateFactoryMap.values().iterator(); 
var1.hasNext(); solrClient = null) {
        SolrTemplateFactory solrTemplateFactory = 
(SolrTemplateFactory)var1.next();
        solrClient = solrTemplateFactory.getSolrTemplate().getSolrClient();
        solrClient.close();
    }

}

By now this are the number of SolrZkClient

[cid:[email protected]]

Please let us know if there is any bug or we need to close SolrZkClient 
manually. If so, how?




Thanks,
Jigar Gajjar

Reply via email to