lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken McCracken (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (LUCENE-3627) CorruptIndexException on indexing after a failure occurs after segments file creation but before any bytes are written
Date Wed, 07 Dec 2011 23:38:42 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164837#comment-13164837
] 

Ken McCracken edited comment on LUCENE-3627 at 12/7/11 11:36 PM:
-----------------------------------------------------------------

Initial proposed patch.  I'm not sure if this is the correct place and scope.  But it does
fix my test case.
The test case and the proposed code change are attached.

aaa:lucene kmccrack$ svn info
Path: .
URL: http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_5/lucene
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1211687
Node Kind: directory
Schedule: normal
Last Changed Author: sarowe
Last Changed Rev: 1207561
Last Changed Date: 2011-11-28 15:11:35 -0500 (Mon, 28 Nov 2011)

                
      was (Author: ken.mccracken):
    Initial proposed patch.  I'm not sure if this is the correct place and scope.  But it
does fix my test case.
The test case and the proposed code change are attached.
                  
> CorruptIndexException on indexing after a failure occurs after segments file creation
but before any bytes are written
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3627
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3627
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 3.5
>         Environment: lucene-3.5.0, src download from GA release lucene.apache.org.
> Mac OS X 10.6.5, running tests in Eclipse Build id: 20100218-1602, 
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
>            Reporter: Ken McCracken
>            Priority: Critical
>         Attachments: LUCENE-3627_initial_proposal.txt, TestCrashCausesCorruptIndex.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> FSDirectory.createOutput(..) uses a RandomAccessFile to do its work.  On my system the
default FSDirectory.open(..) creates an NIOFSDirectory.  If createOutput is called on a segments_*
file and a crash occurs between RandomAccessFile creation (file system shows a segments_*
file exists but has zero bytes) but before any bytes are written to the file, subsequent IndexWriters
cannot proceed.  The difficulty is that it does not know how to clear the empty segments_*
file.  None of the file deletions will happen on such a segment file because the opening bytes
cannot not be read to determine format and version.
> I will attempt to attach a Test file demonstrates the issue; place it in your 
> src/test/org/apache/lucene/store/
> directory and run the unit tests with JUnit4.

--
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


Mime
View raw message