You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael Busch (JIRA)" <ji...@apache.org> on 2007/02/26 01:28:05 UTC

[jira] Closed: (LUCENE-592) Create compound file after addIndexes but before rewrite of segments

     [ https://issues.apache.org/jira/browse/LUCENE-592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Busch closed LUCENE-592.
--------------------------------

       Resolution: Won't Fix
    Fix Version/s: 2.1

The described problem can not occur with Lucene 2.1 anymore. Now in SegmentInfo is stored whether a segment is in cfs format. After the IndexWriter created a segment in non-cfs format this new segment is committed with SegmentInfo.isCompoundFile = false. Only if a cfs file can be written successfully thereafter, the segment is committed with SegmentInfo.isCompoundFile == true. 
So even if the writing of the cfs file fails for some reason and there is a corrupted cfs file on disk, it is not referenced by the segments file and thus an IndexReader/writer would not try to open it.

> Create compound file after addIndexes but before rewrite of segments
> --------------------------------------------------------------------
>
>                 Key: LUCENE-592
>                 URL: https://issues.apache.org/jira/browse/LUCENE-592
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 1.9, 2.0.0
>            Reporter: Karel Tejnora
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: createCfthanSegments.diff
>
>
> When compound file format is used new 'segments' file is written before cfs is created. If there is an exception (disk full, etc.) or it is opened before cfs exists, segments points to non-existing file.
> This is a small change in index/IndexWriter.java, just a swap a block of code beginning with if(useCompoundFile) ...

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org