lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SOLR-1808) When IndexReader.reopen is called, old reader is not properly closed
Date Tue, 09 Mar 2010 23:08:27 GMT

     [ https://issues.apache.org/jira/browse/SOLR-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hoss Man resolved SOLR-1808.
----------------------------

    Resolution: Not A Problem

As mark said: IndexReaders are refcounted (regardless of whether they come from open or reopen)
so that they aren't closed until they are no logner in use.

I'm not seeing any evidence of a bug here, pelase reopen if you can point to a concrete example
of where an IndexReader is being leaked.

> When IndexReader.reopen is called, old reader is not properly closed
> --------------------------------------------------------------------
>
>                 Key: SOLR-1808
>                 URL: https://issues.apache.org/jira/browse/SOLR-1808
>             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 SolrCore.java:
> 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.


Mime
View raw message