[
https://issues.apache.org/jira/browse/OPENJPA-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115771#comment-18115771
]
ASF subversion and git services commented on OPENJPA-2954:
----------------------------------------------------------
Commit 882d23963ba5bd6844345914aae0e309d8dacb63 in openjpa's branch
refs/heads/master from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=882d23963 ]
Merge pull request #185 from apache/OPENJPA-2954
[OPENJPA-2954] Publish the cached AttributeConverter instance safely
> Unsafe publication of cached AttributeConverter instance
> --------------------------------------------------------
>
> Key: OPENJPA-2954
> URL: https://issues.apache.org/jira/browse/OPENJPA-2954
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3682999838
> **(medium)** The converter instance is now created once and cached in a
> non-volatile field without synchronization; FieldMetaData is shared across
> brokers/threads, so this is unsafe publication and a behavior change
> (previously a new converter instance per conversion, now one shared instance
> that must be thread-safe). Consider thread-safe caching and documenting that
> AttributeConverters are treated as shared/stateless.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)