[jira] Created: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

Tim Allison (Jira)
RAMDirectory reports incorrect EOF on seek
------------------------------------------

                 Key: LUCENE-1196
                 URL: https://issues.apache.org/jira/browse/LUCENE-1196
             Project: Lucene - Java
          Issue Type: Bug
          Components: Store
    Affects Versions: 2.3.1, 2.3, 2.2, 2.1, 2.0.0, 1.9, 2.4, 2.9, 3.0
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 2.4


If you create a file whose length is a multiple of 1024 (BUFFER_SIZE),
and then try to seek to the very end of the file, you hit
EOFException.

But this is actually "legal" as long as you don't try to read any
bytes at that point.

I'm hitting this (rarely) with the bulk-merging logic for term vectors
(LUCENE-1120), which can seek to the very end of the file but not read
any bytes if conditions are right.



--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

Tim Allison (Jira)

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

Michael McCandless updated LUCENE-1196:
---------------------------------------

    Attachment: LUCENE-1196.patch

Attached patch that shows the issue & fixes it.  Will commit in a day or so.

> RAMDirectory reports incorrect EOF on seek
> ------------------------------------------
>
>                 Key: LUCENE-1196
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1196
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.9, 3.0
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1196.patch
>
>
> If you create a file whose length is a multiple of 1024 (BUFFER_SIZE),
> and then try to seek to the very end of the file, you hit
> EOFException.
> But this is actually "legal" as long as you don't try to read any
> bytes at that point.
> I'm hitting this (rarely) with the bulk-merging logic for term vectors
> (LUCENE-1120), which can seek to the very end of the file but not read
> any bytes if conditions are right.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/LUCENE-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573448#action_12573448 ]

Yonik Seeley commented on LUCENE-1196:
--------------------------------------

+1, looks fine.

> RAMDirectory reports incorrect EOF on seek
> ------------------------------------------
>
>                 Key: LUCENE-1196
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1196
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.9, 3.0
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1196.patch
>
>
> If you create a file whose length is a multiple of 1024 (BUFFER_SIZE),
> and then try to seek to the very end of the file, you hit
> EOFException.
> But this is actually "legal" as long as you don't try to read any
> bytes at that point.
> I'm hitting this (rarely) with the bulk-merging logic for term vectors
> (LUCENE-1120), which can seek to the very end of the file but not read
> any bytes if conditions are right.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/LUCENE-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573452#action_12573452 ]

Michael McCandless commented on LUCENE-1196:
--------------------------------------------

Thanks Yonik!  I'll commit shortly.

> RAMDirectory reports incorrect EOF on seek
> ------------------------------------------
>
>                 Key: LUCENE-1196
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1196
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.9, 3.0
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1196.patch
>
>
> If you create a file whose length is a multiple of 1024 (BUFFER_SIZE),
> and then try to seek to the very end of the file, you hit
> EOFException.
> But this is actually "legal" as long as you don't try to read any
> bytes at that point.
> I'm hitting this (rarely) with the bulk-merging logic for term vectors
> (LUCENE-1120), which can seek to the very end of the file but not read
> any bytes if conditions are right.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCENE-1196) RAMDirectory reports incorrect EOF on seek

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

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

Michael McCandless resolved LUCENE-1196.
----------------------------------------

    Resolution: Fixed

> RAMDirectory reports incorrect EOF on seek
> ------------------------------------------
>
>                 Key: LUCENE-1196
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1196
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.9, 3.0
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1196.patch
>
>
> If you create a file whose length is a multiple of 1024 (BUFFER_SIZE),
> and then try to seek to the very end of the file, you hit
> EOFException.
> But this is actually "legal" as long as you don't try to read any
> bytes at that point.
> I'm hitting this (rarely) with the bulk-merging logic for term vectors
> (LUCENE-1120), which can seek to the very end of the file but not read
> any bytes if conditions are right.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]