lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wang (JIRA)" <>
Subject [jira] Commented: (SOLR-1808) When IndexReader.reopen is called, old reader is not properly closed
Date Tue, 09 Mar 2010 23:42:27 GMT


John Wang commented on SOLR-1808:

Thanks Mark and Chris. I meant to close this bug, but kept forgetting it. Thanks for explaining.

On the same node, Solr is maintaining a heavy weight Searcher instance, but the search related
information is stored with reader. This is especially important with lucene 2.9 where segmented
readers are more exposed. Do you guys still think having heavy SolrIndexSearcher instances
is a good thing?

Anyway, no problem with closing this issue.

> When IndexReader.reopen is called, old reader is not properly closed
> --------------------------------------------------------------------
>                 Key: SOLR-1808
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.4
>            Reporter: John Wang
> According to Lucene documentation:
> "If the index has not changed since this instance was (re)opened, then this call is a
NOOP and returns this instance. Otherwise, a new instance is returned. The old instance is
not closed and remains usable."
> In
> if (newestSearcher != null && solrConfig.reopenReaders
>           && indexDirFile.equals(newIndexDirFile)) {
>         IndexReader currentReader = newestSearcher.get().getReader();
>         IndexReader newReader = currentReader.reopen();
>         if (newReader == currentReader) {
>           currentReader.incRef();
>         }
>         tmp = new SolrIndexSearcher(this, schema, "main", newReader, true, true);
>       }
> When currentReader!=newReader, currentReader seems to be leaking.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message