Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 69107 invoked from network); 25 Jun 2009 15:18:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 15:18:26 -0000 Received: (qmail 52711 invoked by uid 500); 25 Jun 2009 15:18:36 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 52650 invoked by uid 500); 25 Jun 2009 15:18:36 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 52642 invoked by uid 99); 25 Jun 2009 15:18:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 15:18:36 +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; Thu, 25 Jun 2009 15:18:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 676DF234C1E9 for ; Thu, 25 Jun 2009 08:18:07 -0700 (PDT) Message-ID: <664544639.1245943087422.JavaMail.jira@brutus> Date: Thu, 25 Jun 2009 08:18:07 -0700 (PDT) From: "Shai Erera (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1707) Don't use ensureOpen() excessively in IndexReader and IndexWriter In-Reply-To: <1523185665.1245551767331.JavaMail.jira@brutus> 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-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12724121#action_12724121 ] Shai Erera commented on LUCENE-1707: ------------------------------------ bq. If decRef() is called and refCount is 0, doClose() (not close()) is called. I think this is right? If you call decRef() and then close(), it'll be wrong? I think the solution is to set closed = true in decRef() after doClose() has returned? > Don't use ensureOpen() excessively in IndexReader and IndexWriter > ----------------------------------------------------------------- > > Key: LUCENE-1707 > URL: https://issues.apache.org/jira/browse/LUCENE-1707 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Shai Erera > Fix For: 2.9 > > Attachments: LUCENE-1707.patch > > > A spin off from here: http://www.nabble.com/Excessive-use-of-ensureOpen()-td24127806.html. > We should stop calling this method when it's not necessary for any internal Lucene code. Currently, this code seems to hurt properly written apps, unnecessarily. > Will post a patch soon -- 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: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org