avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carey (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (AVRO-820) Java: Exceptions thrown while encoding a record while writing an Avro Data file will produce a corrupt file.
Date Fri, 13 May 2011 20:47:53 GMT

    [ https://issues.apache.org/jira/browse/AVRO-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033276#comment-13033276
] 

Scott Carey edited comment on AVRO-820 at 5/13/11 8:47 PM:
-----------------------------------------------------------

Attached patch includes a fix and a test that demonstrates the corruption and fix.

      was (Author: scott_carey):
    Attached patch includes a fix and a test that triggers the corruption without the fix.
  
> Java: Exceptions thrown while encoding a record while writing an Avro Data file will
produce a corrupt file. 
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AVRO-820
>                 URL: https://issues.apache.org/jira/browse/AVRO-820
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.4.1, 1.5.0, 1.5.1
>            Reporter: Scott Carey
>            Assignee: Scott Carey
>            Priority: Critical
>         Attachments: AVRO-820.patch
>
>
> If an exception is thrown while serializing a record in DataFileWriter<D>.append(D)
partial contents of that serialization will end up in the file.  This corrupts the block.
 
> DataFileWriter should ensure that the buffer is rewound to the state prior to the record
write in the case of an exception thrown during serialization to prevent creating a corrupt
file.

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

Mime
View raw message