Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2947

Classloading Race condition with LogicalTypes.register

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.10.0, 1.9.2
    • 1.11.0
    • java, logical types
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              safetytrick Michael Nielson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: