You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ning Li (JIRA)" <ji...@apache.org> on 2006/11/01 18:20:17 UTC

[jira] Commented: (LUCENE-702) Disk full during addIndexes(Directory[]) can corrupt index

    [ http://issues.apache.org/jira/browse/LUCENE-702?page=comments#action_12446307 ] 
            
Ning Li commented on LUCENE-702:
--------------------------------

A possible solution to this issue is to check, when writing segment infos to "segments" in directory d,
whether dir of a segment info is d, and only write if it is. Suggestions?

The following is my comment on this issue from the mailing list documenting how Lucene could
produce an inconsistent index if addIndexes(Directory[]) does not run to its completion.

"This makes me notice a bug in current addIndexes(Directory[]). In current addIndexes(Directory[]),
segment infos in S are added to T's "segmentInfos" upfront. Then segments in S are merged to T
several at a time. Every merge is committed with T's "segmentInfos". So if a reader is opened on T
while addIndexes(Directory[]) is going on, it could see an inconsistent index."


> Disk full during addIndexes(Directory[]) can corrupt index
> ----------------------------------------------------------
>
>                 Key: LUCENE-702
>                 URL: http://issues.apache.org/jira/browse/LUCENE-702
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.1
>            Reporter: Michael McCandless
>         Assigned To: Michael McCandless
>
> This is a spinoff of LUCENE-555
> If the disk fills up during this call then the committed segments file can reference segments that were not written.  Then the whole index becomes unusable.
> Does anyone know of any other cases where disk full could corrupt the index?
> I think disk full should worse lose the documents that were "in flight" at the time.  It shouldn't corrupt the index.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org