Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 81153 invoked from network); 25 May 2010 16:20:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 May 2010 16:20:48 -0000 Received: (qmail 41257 invoked by uid 500); 25 May 2010 16:20:47 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 41203 invoked by uid 500); 25 May 2010 16:20:47 -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 41196 invoked by uid 99); 25 May 2010 16:20:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 16:20:47 +0000 X-ASF-Spam-Status: No, hits=-1462.9 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 16:20:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4PGKQGO025492 for ; Tue, 25 May 2010 16:20:26 GMT Message-ID: <30092910.37611274804426636.JavaMail.jira@thor> Date: Tue, 25 May 2010 12:20:26 -0400 (EDT) From: "Shai Erera (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2476) Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock obtained In-Reply-To: <29509182.36581274801364952.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871230#action_12871230 ] Shai Erera commented on LUCENE-2476: ------------------------------------ This exception shows a LockObtainFailed exception - can you post the one that resulted in NegativeArraySize -- curious to know where you hit it, and what sort of corruption yields to that :). > Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock obtained > ------------------------------------------------------------------------------------------------ > > Key: LUCENE-2476 > URL: https://issues.apache.org/jira/browse/LUCENE-2476 > Project: Lucene - Java > Issue Type: Bug > Components: Store > Affects Versions: 3.0.1 > Reporter: Cservenak, Tamas > Assignee: Michael McCandless > Priority: Blocker > Fix For: 3.1, 4.0 > > Attachments: LUCENE-2476.patch > > > Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock obtained. > The init method in IndexWriter catches IOException only (I got NegativeArraySize by reading up a _corrupt_ index), and now, there is no way to recover, since the writeLock will be kept obtained. Moreover, I don't have IndexWriter instance either, to "grab" the lock somehow, since the init() method is called from IndexWriter constructor. > Either broaden the catch to all exceptions, or at least provide some circumvention to clear up. In my case, I'd like to "fallback", just delete the corrupted index from disk and recreate it, but it is impossible, since the LOCK_HELD NativeFSLockFactory's entry about obtained WriteLock is _never_ cleaned out and is no (at least apparent) way to clean it out forcibly. I can't create new IndexWriter, since it will always fail with LockObtainFailedException. -- 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org