You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Michael Nielson (Jira)" <ji...@apache.org> on 2022/09/23 19:15:00 UTC

[jira] [Resolved] (AVRO-2947) Classloading Race condition with LogicalTypes.register

     [ https://issues.apache.org/jira/browse/AVRO-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Nielson resolved AVRO-2947.
-----------------------------------
    Fix Version/s: 1.11.0
       Resolution: Fixed

Thank you!

> Classloading Race condition with LogicalTypes.register
> ------------------------------------------------------
>
>                 Key: AVRO-2947
>                 URL: https://issues.apache.org/jira/browse/AVRO-2947
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java, logical types
>    Affects Versions: 1.10.0, 1.9.2
>            Reporter: Michael Nielson
>            Priority: Major
>             Fix For: 1.11.0
>
>
> In the Java api you must register any custom logical types before you use them with:
> {{ LogicalTypes.register }}
>  
> This must be done before the schema is parsed or the parsing process will not discover the logical type, additionally for generated classes the schema is parsed when the class is loaded.
> This creates a race condition where you must have your calls to register logical types happen before anything attempts to load your class.
>  
> This could be a solution to the problem:
> https://github.com/apache/avro/pull/885#issuecomment-640462476



--
This message was sent by Atlassian Jira
(v8.20.10#820010)