Ashley Taylor created AVRO-3987: ----------------------------------- Summary: Concurrency improvement for ReflectData FieldAccessors Key: AVRO-3987 URL: https://issues.apache.org/jira/browse/AVRO-3987 Project: Apache Avro Issue Type: Improvement Reporter: Ashley Taylor
Currently, within ReflectData subclass ClassAccessorData, there is a WeakHashMap called bySchema. This contains the FieldAccessor[] needed to build the Object. To prevent concurrency issues currently, the getAccessorsFor method is synchronized. This method is called per record read/write. Using an immutable replace approach with each changing and switching to a volatile object results in significant performance improvement -- This message was sent by Atlassian Jira (v8.20.10#820010)