lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cservenak, Tamas (JIRA)" <>
Subject [jira] Commented: (LUCENE-2476) Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock obtained
Date Tue, 25 May 2010 16:40:25 GMT


Cservenak, Tamas commented on LUCENE-2476:

This is a Lucene index _known_ to be corrupt (got from a "live" Nexus or just "breaking" it
manually by tampering with hex editor, not remember anymore). The Lucene used to create this
index is 2.3.2, so during this UT I believe an index upgrade happens too.

[INFO] Failed to configure timeline index, trying to repair it.
org.sonatype.timeline.TimelineException: Fail to configure timeline index!
	at org.sonatype.timeline.DefaultTimelineIndexer.configure(
	at org.sonatype.timeline.DefaultTimeline.configure(
	at org.sonatype.timeline.TimelineTest.testRepairIndexCouldNotRead(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at junit.framework.TestCase.runTest(
	at junit.framework.TestCase.runBare(
	at junit.framework.TestResult$1.protect(
	at junit.framework.TestResult.runProtected(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Caused by: java.lang.NegativeArraySizeException
	at org.apache.lucene.index.SegmentInfo.<init>(
	at org.apache.lucene.index.SegmentInfos$1.doBody(
	at org.apache.lucene.index.SegmentInfos$
	at org.apache.lucene.index.SegmentInfos$
	at org.apache.lucene.index.IndexWriter.init(
	at org.apache.lucene.index.IndexWriter.<init>(
	at org.sonatype.timeline.DefaultTimelineIndexer.configure(
	... 18 more

> Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock
> ------------------------------------------------------------------------------------------------
>                 Key: LUCENE-2476
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 3.0.1
>            Reporter: Cservenak, Tamas
>            Assignee: Michael McCandless
>            Priority: Blocker
>             Fix For: 3.0.2, 3.1, 4.0
>         Attachments: LUCENE-2476.patch
> Constructor of IndexWriter let's runtime exceptions pop up, while keeping the writeLock
> 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:
For additional commands, e-mail:

View raw message