Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-882

2nd read on end of file gives error

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.5.2
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None

      Description

      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

      1. a.diff
        2 kB
        Yang Yang

        Activity

        Hide
        vsank2 Venkatesh added a comment -

        Hi, I have the same problem. Is there a fix to this issue. ?

        Show
        vsank2 Venkatesh added a comment - Hi, I have the same problem. Is there a fix to this issue. ?
        Hide
        mhuff Micah Huff added a comment -

        Scott Carey--Is there any chance that this will be making it into the 1.7.5 release? We're encountering the same issue now and it would be great to have a patch for this.

        Thanks!

        Show
        mhuff Micah Huff added a comment - Scott Carey --Is there any chance that this will be making it into the 1.7.5 release? We're encountering the same issue now and it would be great to have a patch for this. Thanks!
        Hide
        scott_carey Scott Carey added a comment -

        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!

        Show
        scott_carey Scott Carey added a comment - 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!
        Hide
        yangyangyyy Yang Yang added a comment -

        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

        Show
        yangyangyyy Yang Yang added a comment - 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

          People

          • Assignee:
            Unassigned
            Reporter:
            yangyangyyy Yang Yang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development