You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Joshua Hyde (JIRA)" <ji...@apache.org> on 2015/06/04 21:45:39 UTC

[jira] [Created] (AVRO-1677) Building objects with "null" default value for byte arrays is not thread-safe

Joshua Hyde created AVRO-1677:
---------------------------------

             Summary: Building objects with "null" default value for byte arrays is not thread-safe
                 Key: AVRO-1677
                 URL: https://issues.apache.org/jira/browse/AVRO-1677
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.7.7
            Reporter: Joshua Hyde


When building objects that have a {{null}} default value for a byte array, building those objects with that default value - even if those builders are constrained to individual threads (i.e., no shared instances between threads) - I intermittently get {{ArrayIndexOutOfBoundsException}} and {{BufferUnderflowException}} errors.

I have available a project that can almost always reproduce this issue:

https://github.com/jrh3k5/avro-specificdata-thread-safety-demo

I strongly suspect that this is the result of a shared {{SpecificData}} object, which all record builders that extend {{SpecificRecordBuilderBase}} use, when retrieving / building this default value.



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