[
https://issues.apache.org/jira/browse/AVRO-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15461933#comment-15461933
]
ASF subversion and git services commented on AVRO-607:
------------------------------------------------------
Commit fa0059c55a31813634188eb85e53b68e33644489 in avro's branch
refs/heads/master from [~Andrius Driu]
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=fa0059c ]
AVRO-607: Java: Make SpecificData schema cache thread-safe.
Changed SpecificData.getSchema to use a thread-safe Cache class from
Google Guava.
> 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:
> 0001-AVRO-607-Changed-SpecificData.getSchema-to-use-a-thr.patch,
> 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)