avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-607) SpecificData.getSchema not thread-safe
Date Thu, 21 Jul 2016 21:06:20 GMT

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

Sean Busbey commented on AVRO-607:
----------------------------------

{code}
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
{code}

If these are in the shaded module, shouldn't they be relocated from the com.google namespace?

> 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, 1.8.1
>            Reporter: Stephen Tu
>            Assignee: Andrius Druzinis-Vitkus
>            Priority: Blocker
>              Labels: newbie, patch
>             Fix For: 1.8.2
>
>         Attachments: AVRO-607.patch, 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)

Mime
View raw message