lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Updated: (LUCENE-1232) Use segments generation instead of version
Date Fri, 14 Mar 2008 17:02:24 GMT


Doron Cohen updated LUCENE-1232:

    Attachment: check.version.vs.gen.diff

To test this I added to SegmentInfos a comparison of *current_generation* to 
*versionGap* where the latter is defined as *current_version - first_vald_version*. 
The values are compared at writing the segmentInfos, which is where both are updated.
Note: this path is applied on svn head - i.e. before/without the patch that gets rid of version.
All core tests pass except one: 
    [junit] ------------- Standard Output ---------------
    [junit] At write (segments_4) ver=1205513263760 verGap=3 gen=4   WRONG !!!!!!!!!!!!!!
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testAddIndexOnDiskFull(org.apache.lucene.index.TestIndexWriter):  Caused
    [junit] At write (segments_4) ver=1205513263760 verGap=3 gen=4   WRONG !!!!!!!!!!!!!!
    [junit] java.lang.RuntimeException: At write (segments_4) ver=1205513263760 verGap=3 gen=4
  WRONG !!!!!!!!!!!!!!
    [junit]     at org.apache.lucene.index.SegmentInfos.compareVersionAndGeneration(
    [junit]     at org.apache.lucene.index.SegmentInfos.write(
    [junit]     at org.apache.lucene.index.SegmentInfos.commit(
    [junit]     at org.apache.lucene.index.IndexWriter.commit(
    [junit]     at org.apache.lucene.index.IndexWriter.commitTransaction(
    [junit]     at org.apache.lucene.index.IndexWriter.addIndexes(
    [junit]     at org.apache.lucene.index.TestIndexWriter.testAddIndexOnDiskFull(
    [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
Mike, since all tests passed for you when disabling version I assume this failure is just
to deliberately hitting that full disk error, but I thought perhaps you'd like to take a look
at that to make sure.

> Use segments generation instead of version
> ------------------------------------------
>                 Key: LUCENE-1232
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.1, 2.2, 2.3, 2.3.1
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>         Attachments: check.version.vs.gen.diff, LUCENE-1232.patch
> Right now the segments file stores generation, a long starting with 0
> that increments by 1 with each commit, and version, a long starting
> with System.currentTimeMillis() that also increments by 1 with each
> commit.
> I think they are redundant so we can replace all methods/uses of
> version with generation instead.
> Spinoff from LUCENE-1228.

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:
For additional commands, e-mail:

View raw message