You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Joel Bernstein (JIRA)" <ji...@apache.org> on 2016/08/23 19:57:21 UTC
[jira] [Comment Edited] (SOLR-9406) SolrSuggester should
selectively register close hook
[ https://issues.apache.org/jira/browse/SOLR-9406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15433503#comment-15433503 ]
Joel Bernstein edited comment on SOLR-9406 at 8/23/16 7:57 PM:
---------------------------------------------------------------
Shoot, I put the wrong jira ticket on the commit. I used SEARCH-9406 instead of SOLR-9406. SEARCH is what we use at alfresco to prefix search tickets.
The master commit was:
https://github.com/apache/lucene-solr/commit/a1b55eb743a6826299f155f95e41676fc33b576a
The branch_6x commit was:
https://github.com/apache/lucene-solr/commit/f64262ed89ecc0194250a28bd9b2521ea2c8f459
was (Author: joel.bernstein):
Shoot, I put the wrong jira ticket on the commit. I used SEARCH-9406 instead of SOLR-9406. SEARCH is what we use at alfresco to prefix search tickets.
The master commit was:
https://github.com/apache/lucene-solr/commit/49ba37ac4dac2421c08728d87843b0a5e4245828
The branch_6x commit was:
https://github.com/apache/lucene-solr/commit/f64262ed89ecc0194250a28bd9b2521ea2c8f459
> SolrSuggester should selectively register close hook
> ----------------------------------------------------
>
> Key: SOLR-9406
> URL: https://issues.apache.org/jira/browse/SOLR-9406
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Suggester
> Affects Versions: 4.10.3
> Reporter: Gethin James
> Assignee: Joel Bernstein
> Attachments: SOLR-9406.patch
>
>
> Currently this is the code for registering a close hook for SolrSuggester:
> {code}
> lookup = factory.create(config, core);
> core.addCloseHook(new CloseHook() {
> @Override
> public void preClose(SolrCore core) {
> if (lookup != null && lookup instanceof Closeable) {
> try {
> ((Closeable) lookup).close();
> } catch (IOException e) {
> LOG.warn("Could not close the suggester lookup.", e);
> }
> }
> }
>
> @Override
> public void postClose(SolrCore core) {}
> });
> {code}
> Notice that the close hook is always registered, even though the close logic runs conditionally.
> This can be changed so that the close hook is registered conditionally.
> This will help avoid memory leaks in scenarios where a custom component reloads the SolrSuggester multiple times for the same core.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org