You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2021/08/24 11:18:17 UTC

[GitHub] [avro] Skeeve opened a new pull request #1313: fix error when trying to read 0 bytes at eof

Skeeve opened a new pull request #1313:
URL: https://github.com/apache/avro/pull/1313


   When reading an avro file record for record each time when reading the last record DataFileReader tries to get the next block but (of course) fails. This fixes the issue.
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   I have no Jira access.
   
   ### Tests
   
   - [X] does not need testing for this extremely good reason:
   
   It's a +/-1 issue and the fix is in use now for 5 months.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] Skeeve commented on pull request #1313: fix error when trying to read 0 bytes at eof

Posted by GitBox <gi...@apache.org>.
Skeeve commented on pull request #1313:
URL: https://github.com/apache/avro/pull/1313#issuecomment-904582462


   Sorry, but in March I simply required the stuff to work and I had (and have not) time to dive into all the source code and stuff around it of a module I simply want to use.
   Take it or leave it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] Skeeve commented on a change in pull request #1313: fix error when trying to read 0 bytes at eof

Posted by GitBox <gi...@apache.org>.
Skeeve commented on a change in pull request #1313:
URL: https://github.com/apache/avro/pull/1313#discussion_r694789211



##########
File path: lang/perl/lib/Avro/DataFileReader.pm
##########
@@ -133,12 +133,12 @@ sub next {
 
     my @objs;
 
-    $datafile->read_block_header if $datafile->eob;
+    $datafile->read_block_header if $datafile->eob and not $datafile->eof;
     return ()                    if $datafile->eof;

Review comment:
       Good point.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] Skeeve closed pull request #1313: fix error when trying to read 0 bytes at eof

Posted by GitBox <gi...@apache.org>.
Skeeve closed pull request #1313:
URL: https://github.com/apache/avro/pull/1313


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #1313: fix error when trying to read 0 bytes at eof

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #1313:
URL: https://github.com/apache/avro/pull/1313#discussion_r694788017



##########
File path: lang/perl/lib/Avro/DataFileReader.pm
##########
@@ -133,12 +133,12 @@ sub next {
 
     my @objs;
 
-    $datafile->read_block_header if $datafile->eob;
+    $datafile->read_block_header if $datafile->eob and not $datafile->eof;
     return ()                    if $datafile->eof;

Review comment:
       Why don't you move this line before line 136 ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on pull request #1313: fix error when trying to read 0 bytes at eof

Posted by GitBox <gi...@apache.org>.
martin-g commented on pull request #1313:
URL: https://github.com/apache/avro/pull/1313#issuecomment-904581069


   >     * does not need testing for this extremely good reason:
   > 
   > 
   > It's a +/-1 issue and the fix is in use now for 5 months.
   
   This is not a good reason!
   A test would help to prevent regressions in the future!
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org