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 McCandless (JIRA)" <ji...@apache.org> on 2010/07/02 11:34:49 UTC

[jira] Created: (LUCENE-2523) if index is too old you should hit an exception saying so

if index is too old you should hit an exception saying so
---------------------------------------------------------

                 Key: LUCENE-2523
                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
            Reporter: Michael McCandless
            Priority: Minor
             Fix For: 4.0


If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
{noformat}
java.io.IOException: read past EOF
        at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
        at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
        at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
        at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
        at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
        at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
        at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
        at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
        at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
        at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
        at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
{noformat}

I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Commented: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889640#action_12889640 ] 

Uwe Schindler commented on LUCENE-2523:
---------------------------------------

I think this is ready to commit!

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Commented: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884663#action_12884663 ] 

Mark Miller commented on LUCENE-2523:
-------------------------------------

bq. I think instead we should throw an IndexTooOldException or something like that?

+1 - should be nice warm warnings for all index version incompat stuff. A Solr user ran into this the other day I think.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

This patch now also adds a test, that tries to open old indexes in TestBaclwards and tries to use them. This should produce *only* IndexTooOldExceptions, if other exceptions are throws we have still bugs.

You have to add the old zip files back from 3.x branch with slight renaming. I prefer to use all of them to check all possible old formats, especially those with no version support.

All tests pass.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

The final patch:
- I streamlined the exceptions. The ctor tooks filename, actual format version and min/max. The message is then generated in the exception ctor and looks identical everywhere in the code. Where the filename is not available, it is left out (null). Maybe we should add the filename to CodecUtils, to be able to display it on errors. This helps finding out, which file has wrong header. Or is there a way to get file name from IndexInput?
- I keep the segments.gen version check disabled, this seems to be needed on windows, to be able to retry.

I will commit soon!

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

Added minimum version support to CodecUtil.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

Here a revised patch after discussion in IRC:
- Move the SegmentInfos Versions to the default reader/writer. There is still the format version used at one place in o.a.l.index, maybe we should remove version support there, too
- Added two Exceptions for too old and too new index.
- Unified all messages

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Commented: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889888#action_12889888 ] 

Uwe Schindler commented on LUCENE-2523:
---------------------------------------

I had the same idea, I think I should change this! I will also change the Exception ctor a little bit to produce a generic text, maybe including filename and min/max format version.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Assigned: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler reassigned LUCENE-2523:
-------------------------------------

    Assignee: Uwe Schindler

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

- Rename of Exception
- Disabled the segments.gen version check. I had several exceptions about illegal format 0 on windows.

Will investigate more tomorrow.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment: LUCENE-2523.patch

Here initial patch. I have not yet added a new Exception, but if the text is saying all information and we maybe better use Version Names that contain the first/last supported Lucene Version (not format version), we are fine.

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Resolved: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-2523.
-----------------------------------

    Lucene Fields: [New, Patch Available]  (was: [New])
       Resolution: Fixed

Committed revision: 965868

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Updated: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2523:
----------------------------------

    Attachment:     (was: LUCENE-2523.patch)

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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


[jira] Commented: (LUCENE-2523) if index is too old you should hit an exception saying so

Posted by "Chris Male (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889874#action_12889874 ] 

Chris Male commented on LUCENE-2523:
------------------------------------

Since its the format of the index, not the index itself, that is too old / too new, I vote for calling the exceptions IndexFormatTooOldException / IndexFormatTooNewException.  

> if index is too old you should hit an exception saying so
> ---------------------------------------------------------
>
>                 Key: LUCENE-2523
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2523
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch, LUCENE-2523.patch
>
>
> If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:
> {noformat}
> java.io.IOException: read past EOF
>         at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
>         at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>         at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
>         at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
>         at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
>         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
>         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
>         at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
>         at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
> {noformat}
> I think instead we should throw an IndexTooOldException or something like that?

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