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

Dave Latham commented on AVRO-607:
----------------------------------

This is affecting us in production, with the symptom being hundreds of threads 
being stuck in a loop at:
{noformat}
        at java.util.WeakHashMap.get(WeakHashMap.java:470)
        at 
org.apache.avro.specific.SpecificData.getSchema(SpecificData.java:138)
        at 
org.apache.avro.specific.SpecificDatumWriter.<init>(SpecificDatumWriter.java:33)
{noformat}
until the process is restarted.

> 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)

Reply via email to