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

> I think we should try to make all of the addIndexes calls (and more
> generally any call to Lucene) "transactional".

Agree. A transactional semantics would be better.

The approach you described for three addIndexes looks good.

addIndexes(IndexReader[]) is transactional but has two commits: one
when existing segments are merged at the beginning, the other at the
end when all segment/readers are merged.

addIndexes(Directory[]) can be fixed to have a similar behaviour:
first commit when existing segments are merged at the beginning, then
at the end when all old/new segments are merged.

addIndexesNoOptimize(Directory[]), on the other hand, does not merge
existing segments at the beginning. So when fixed, it will only have
one commit at the end which captures all the changes.


> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to