You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "vincent ye (JIRA)" <ji...@apache.org> on 2015/12/23 22:32:46 UTC

[jira] [Commented] (AVRO-1497) Add LogicalType support to Java

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

vincent ye commented on AVRO-1497:
----------------------------------

It's good idea to add cache to improve the performance. But the synchronization put up some cost. Without synchronization will cause thread-safe problem. I ran into a infinite loop caused by multiple threads accessing org.apache.avro.LogicalTypes#fromSchemaIgnoreInvalid to update CACHE simultaneously. CACHE is simply backed by a java hashmap without any synchronization. So It run into this race condition problem http://mailinator.blogspot.com/2009/06/beautiful-race-condition.html .
Please take a look at it.


Thank you

> Add LogicalType support to Java
> -------------------------------
>
>                 Key: AVRO-1497
>                 URL: https://issues.apache.org/jira/browse/AVRO-1497
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Ryan Blue
>            Assignee: Ryan Blue
>             Fix For: 1.7.8, 1.8.0
>
>         Attachments: AVRO-1497-1.diff, Logical Types Performance Comparison - Sheet1.csv
>
>
> AVRO-1402 updates the Avro spec to include logical types, which are stored as existing types but interpreted as others. The next step is to implement LogicalType (in Java) that provides tools to attach a logical type to a schema, read a logical type, and validate logical types.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)