lucene-dev mailing list archives

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

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

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: 
{noformat:title=TestIndexWriter.testAddIndexOnDiskFull()}
    [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
an ERROR
    [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(SegmentInfos.java:360)
    [junit]     at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:348)
    [junit]     at org.apache.lucene.index.SegmentInfos.commit(SegmentInfos.java:767)
    [junit]     at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:4194)
    [junit]     at org.apache.lucene.index.IndexWriter.commitTransaction(IndexWriter.java:2530)
    [junit]     at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:3000)
    [junit]     at org.apache.lucene.index.TestIndexWriter.testAddIndexOnDiskFull(TestIndexWriter.java:294)
    [junit]
    [junit]
    [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
{noformat}
Mike, since all tests passed for you when disabling version I assume this failure is just
related 
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: https://issues.apache.org/jira/browse/LUCENE-1232
>             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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message