Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 91853 invoked from network); 9 Mar 2009 10:39:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2009 10:39:18 -0000 Received: (qmail 46079 invoked by uid 500); 9 Mar 2009 10:39:12 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 45988 invoked by uid 500); 9 Mar 2009 10:39:11 -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 45965 invoked by uid 99); 9 Mar 2009 10:39:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 03:39:11 -0700 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; Mon, 09 Mar 2009 10:39:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 801F4234C004 for ; Mon, 9 Mar 2009 03:38:50 -0700 (PDT) Message-ID: <1098434927.1236595130523.JavaMail.jira@brutus> Date: Mon, 9 Mar 2009 03:38:50 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-1552) IndexWriter.addIndexes(IndexReader[] readers) doesn't correctly handle exception success flag. In-Reply-To: <119716383.1236199316129.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-1552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless resolved LUCENE-1552. ---------------------------------------- Resolution: Fixed > IndexWriter.addIndexes(IndexReader[] readers) doesn't correctly handle exception success flag. > ---------------------------------------------------------------------------------------------- > > Key: LUCENE-1552 > URL: https://issues.apache.org/jira/browse/LUCENE-1552 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 2.4 > Environment: Java > Reporter: Scott Garland > Assignee: Michael McCandless > Fix For: 2.4.1, 2.9 > > > After this bit of code in addIndexes(IndexReader[] readers) > try { > flush(true, false, true); > optimize(); // start with zero or 1 seg > success = true; > } finally { > // Take care to release the write lock if we hit an > // exception before starting the transaction > if (!success) > releaseWrite(); > } > The success flag should be reset to "false" because it's used again in another try/catch/finally block. > TestIndexWriter.testAddIndexOnDiskFull() sometimes will hit this bug; but it's infrequent. -- 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