You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2012/11/08 22:56:13 UTC
[jira] [Created] (AVRO-1200) DatumWriter can write malformed data
if collection is modified during write
Tom White created AVRO-1200:
-------------------------------
Summary: DatumWriter can write malformed data if collection is modified during write
Key: AVRO-1200
URL: https://issues.apache.org/jira/browse/AVRO-1200
Project: Avro
Issue Type: Bug
Components: java
Affects Versions: 1.7.2
Reporter: Tom White
Assignee: Tom White
Fix For: 1.7.3
GenericDatumWriter's writeArray and writeMap methods write the size of the collection/map before writing the entries, so it's possible that the sizes will not match, which can cause data corruption and read failures like AVRO-1198.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AVRO-1200) DatumWriter can write malformed data
if collection is modified during write
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493563#comment-13493563 ]
Doug Cutting commented on AVRO-1200:
------------------------------------
+1 The patch looks good. Thanks, Tom, for finding & fixing this!
Doug
> DatumWriter can write malformed data if collection is modified during write
> ---------------------------------------------------------------------------
>
> Key: AVRO-1200
> URL: https://issues.apache.org/jira/browse/AVRO-1200
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.2
> Reporter: Tom White
> Assignee: Tom White
> Fix For: 1.7.3
>
> Attachments: AVRO-1200.patch
>
>
> GenericDatumWriter's writeArray and writeMap methods write the size of the collection/map before writing the entries, so it's possible that the sizes will not match, which can cause data corruption and read failures like AVRO-1198.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AVRO-1200) DatumWriter can write malformed data
if collection is modified during write
Posted by "Tom White (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom White resolved AVRO-1200.
-----------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
I just committed this. Thanks for the review, Doug.
> DatumWriter can write malformed data if collection is modified during write
> ---------------------------------------------------------------------------
>
> Key: AVRO-1200
> URL: https://issues.apache.org/jira/browse/AVRO-1200
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.2
> Reporter: Tom White
> Assignee: Tom White
> Fix For: 1.7.3
>
> Attachments: AVRO-1200.patch
>
>
> GenericDatumWriter's writeArray and writeMap methods write the size of the collection/map before writing the entries, so it's possible that the sizes will not match, which can cause data corruption and read failures like AVRO-1198.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1200) DatumWriter can write malformed data
if collection is modified during write
Posted by "Tom White (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom White updated AVRO-1200:
----------------------------
Attachment: AVRO-1200.patch
Here's a patch that changes the write methods to throw ConcurrentModificationException if the expected and actual sizes don't match.
> DatumWriter can write malformed data if collection is modified during write
> ---------------------------------------------------------------------------
>
> Key: AVRO-1200
> URL: https://issues.apache.org/jira/browse/AVRO-1200
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.2
> Reporter: Tom White
> Assignee: Tom White
> Fix For: 1.7.3
>
> Attachments: AVRO-1200.patch
>
>
> GenericDatumWriter's writeArray and writeMap methods write the size of the collection/map before writing the entries, so it's possible that the sizes will not match, which can cause data corruption and read failures like AVRO-1198.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira