[
https://issues.apache.org/jira/browse/SOLR-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867943#action_12867943
]
Lance Norskog commented on SOLR-1877:
-------------------------------------
Should IndexReader implement the finalize() "complain and close" pattern?
void finalize() {
if (! already Closed) {
log.error("Possible resource leak: this.class.getName() not closed");
try {
close();
} (Throwable t) {
// finalize can throw exceptions which causes weirdness
}
}
}
Nothing in Lucene does this. It is a classic defensive coding trick.
> Investigate unclosed Reader in IndexBasedSpellCheck
> ---------------------------------------------------
>
> Key: SOLR-1877
> URL: https://issues.apache.org/jira/browse/SOLR-1877
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Reporter: Mark Miller
> Priority: Minor
> Fix For: 1.5
>
> Attachments: SOLR-1877.patch
>
>
> Looks like IndexBasedSpellcheck creates a Reader that it passes to
> HighFrequencyDictionary that never gets closed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]