Maxim Solodovnik created OPENJPA-2972:
-----------------------------------------

             Summary: Ceiling mutates shared operator field in appendTo
                 Key: OPENJPA-2972
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2972
             Project: OpenJPA
          Issue Type: Sub-task
          Components: jpa
    Affects Versions: 4.2.0
            Reporter: Maxim Solodovnik
            Assignee: Romain Manni-Bucau
             Fix For: 4.2.0


Discussion thread: 
https://github.com/apache/openjpa/pull/144#discussion_r3683003416


**(low)** `appendTo` mutates the instance field `operator` before delegating to 
`super.appendTo` (same pattern in NaturalLogarithm.java:49). Compiled query 
plans are cached and shared, so this is a data race on shared state; passing 
the dictionary function down locally (e.g. an `appendTo(..., String operator)` 
overload in UnaryOp) would keep the Val immutable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to