Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 37568 invoked from network); 9 Mar 2010 23:09:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Mar 2010 23:09:19 -0000 Received: (qmail 82202 invoked by uid 500); 9 Mar 2010 23:08:50 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 82157 invoked by uid 500); 9 Mar 2010 23:08:50 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 82149 invoked by uid 99); 9 Mar 2010 23:08:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 23:08:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 23:08:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 88E19234C4B5 for ; Tue, 9 Mar 2010 23:08:27 +0000 (UTC) Message-ID: <137796855.165111268176107559.JavaMail.jira@brutus.apache.org> Date: Tue, 9 Mar 2010 23:08:27 +0000 (UTC) From: "Hoss Man (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Resolved: (SOLR-1808) When IndexReader.reopen is called, old reader is not properly closed In-Reply-To: <1286093701.89801267768527350.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.