You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Karel Tejnora (JIRA)" <ji...@apache.org> on 2006/06/07 23:32:29 UTC

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

Create compound file after addIndexes but before rewrite of segments 
---------------------------------------------------------------------

         Key: LUCENE-592
         URL: http://issues.apache.org/jira/browse/LUCENE-592
     Project: Lucene - Java
        Type: Improvement

  Components: Index  
    Versions: 2.0.0, 1.9    
    Reporter: Karel Tejnora
    Priority: Minor


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


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

Posted by "Karel Tejnora (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-592?page=all ]

Karel Tejnora updated LUCENE-592:
---------------------------------

    Attachment: createCfthanSegments.diff

patch swaps described parts of code in IndexWriter.

That is my first use of jira,svn and diff, please be patient if smthg is wrong.

> Create compound file after addIndexes but before rewrite of segments
> --------------------------------------------------------------------
>
>          Key: LUCENE-592
>          URL: http://issues.apache.org/jira/browse/LUCENE-592
>      Project: Lucene - Java
>         Type: Improvement

>   Components: Index
>     Versions: 2.0.0, 1.9
>     Reporter: Karel Tejnora
>     Priority: Minor
>  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.
-
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


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

Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
     [ 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