Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B45F59D55 for ; Wed, 5 Oct 2011 12:25:59 +0000 (UTC) Received: (qmail 14538 invoked by uid 500); 5 Oct 2011 12:25:58 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 14469 invoked by uid 500); 5 Oct 2011 12:25:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 14462 invoked by uid 99); 5 Oct 2011 12:25:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 12:25:58 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 12:25:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 317BD2AACD9 for ; Wed, 5 Oct 2011 12:25:34 +0000 (UTC) Date: Wed, 5 Oct 2011 12:25:34 +0000 (UTC) From: "Shai Erera (Resolved) (JIRA)" To: dev@lucene.apache.org Message-ID: <1253778157.11465.1317817534204.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1794781821.7311.1317735213968.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (LUCENE-3485) LuceneTaxonomyReader .decRef() may close the inner IR, renderring the LTR in a limbo. 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/LUCENE-3485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shai Erera resolved LUCENE-3485. -------------------------------- Resolution: Fixed I removed some copy-paste errors from the test you added, and moved 'closed=true' to after indexReader.close(). Committed revision 1179183 (3x). Committed revision 1179194 (trunk). Thanks Gilad ! > LuceneTaxonomyReader .decRef() may close the inner IR, renderring the LTR in a limbo. > ------------------------------------------------------------------------------------- > > Key: LUCENE-3485 > URL: https://issues.apache.org/jira/browse/LUCENE-3485 > Project: Lucene - Java > Issue Type: Bug > Components: modules/facet > Affects Versions: 3.4 > Reporter: Gilad Barkai > Assignee: Shai Erera > Priority: Minor > Fix For: 3.5, 4.0 > > Attachments: LUCENE-3485.patch, LUCENE-3485.patch > > > TaxonomyReader which supports ref-counting, has a decRef() method which delegates to an inner IndexReader and calls its .decRef(). The latter may close the reader (if the ref is zeroes) but the taxonomy would remain 'open' which will fail many of its method calls. > Also, the LTR's .close() method does not work in the same manner as IndexReader's - which calls decRef(), and leaves the real closing logic to the decRef(). I believe this should be the right approach for the fix. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org