You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Yang Yang (JIRA)" <ji...@apache.org> on 2011/08/31 01:16:09 UTC

[jira] [Created] (AVRO-882) 2nd read on end of file gives error

2nd read on end of file gives error
-----------------------------------

                 Key: AVRO-882
                 URL: https://issues.apache.org/jira/browse/AVRO-882
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.5.2
            Reporter: Yang Yang
            Priority: Minor


if I read on a empty file with BinaryDecoder, I get EOF, good,

but with the current code, if I read it again with the same decoder, I
get a IndexOutofBoundException, not EOF.

it seems that always giving EOF should be a more desirable behavior.

I can see a bug in BinaryEncoder that causes this.


more details in :

http://mail-archives.apache.org/mod_mbox/avro-user/201108.mbox/%3CCAAnh3_9_CQqbmt4VQYZg8-iKfO4nnLPcUZbBwd4kQoAvPEKGKQ@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-882) 2nd read on end of file gives error

Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096519#comment-13096519 ] 

Scott Carey commented on AVRO-882:
----------------------------------

I'll have a look at this in more detail next week.  This is somewhat performance sensitive code, it will require some performance testing to validate any changes.

Thanks for identifying the bug!

> 2nd read on end of file gives error
> -----------------------------------
>
>                 Key: AVRO-882
>                 URL: https://issues.apache.org/jira/browse/AVRO-882
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.5.2
>            Reporter: Yang Yang
>            Priority: Minor
>         Attachments: a.diff
>
>
> if I read on a empty file with BinaryDecoder, I get EOF, good,
> but with the current code, if I read it again with the same decoder, I
> get a IndexOutofBoundException, not EOF.
> it seems that always giving EOF should be a more desirable behavior.
> I can see a bug in BinaryEncoder that causes this.
> more details in :
> http://mail-archives.apache.org/mod_mbox/avro-user/201108.mbox/%3CCAAnh3_9_CQqbmt4VQYZg8-iKfO4nnLPcUZbBwd4kQoAvPEKGKQ@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AVRO-882) 2nd read on end of file gives error

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

Yang Yang updated AVRO-882:
---------------------------

    Attachment: a.diff

I found the bug is slightly more involved than a  1-line change,

attached a patch that works, but apparently better organization around that code can be done by someone more familiar with the code

> 2nd read on end of file gives error
> -----------------------------------
>
>                 Key: AVRO-882
>                 URL: https://issues.apache.org/jira/browse/AVRO-882
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.5.2
>            Reporter: Yang Yang
>            Priority: Minor
>         Attachments: a.diff
>
>
> if I read on a empty file with BinaryDecoder, I get EOF, good,
> but with the current code, if I read it again with the same decoder, I
> get a IndexOutofBoundException, not EOF.
> it seems that always giving EOF should be a more desirable behavior.
> I can see a bug in BinaryEncoder that causes this.
> more details in :
> http://mail-archives.apache.org/mod_mbox/avro-user/201108.mbox/%3CCAAnh3_9_CQqbmt4VQYZg8-iKfO4nnLPcUZbBwd4kQoAvPEKGKQ@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira