[
https://issues.apache.org/jira/browse/AVRO-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851145#comment-17851145
]
ASF subversion and git services commented on AVRO-3987:
-------------------------------------------------------
Commit e932c9453be7b36e8874fe92edb3710beef4e47c in avro's branch
refs/heads/main from Ashley Taylor
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e932c9453 ]
AVRO-3987 replace synchronized with immutable replacement approach (#2900)
> Concurrency improvement for ReflectData FieldAccessors
> ------------------------------------------------------
>
> Key: AVRO-3987
> URL: https://issues.apache.org/jira/browse/AVRO-3987
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Reporter: Ashley Taylor
> Assignee: Ashley Taylor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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)