avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vincent ye (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1497) Add LogicalType support to Java
Date Wed, 23 Dec 2015 21:32:46 GMT

    [ 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

This message was sent by Atlassian JIRA

View raw message