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 2015/11/25 15:46:11 UTC
[jira] [Commented] (AVRO-607) SpecificData.getSchema not
thread-safe
[ https://issues.apache.org/jira/browse/AVRO-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026871#comment-15026871 ]
Tom White commented on AVRO-607:
--------------------------------
> I think I'd rather spend my efforts figuring out how to extract Google's implementation into another namespace in the build with shade, jarjar, or similar.
I agree. Shading Guava is not too hard, and means that we'd be able to use well-tested code.
> SpecificData.getSchema not thread-safe
> --------------------------------------
>
> Key: AVRO-607
> URL: https://issues.apache.org/jira/browse/AVRO-607
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.3.3
> Reporter: Stephen Tu
> Attachments: AVRO-607.patch
>
>
> SpecificData.getSchema uses a WeakHashMap to cache schemas, but WeakHashMap is not thread-safe, and the method itself is not synchronized. Seems like this could lead to the data structure getting corrupted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)