OpenJPA
  1. OpenJPA
  2. OPENJPA-1646

DataCacheManager initialization still isn't thread safe.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: datacache
    • Labels:
      None

      Description

      OPENJPA-1559 reduced the timing window but the problem still exists.

        Issue Links

          Activity

          Hide
          Rick Curtis added a comment -

          Committed revision 940490 to trunk.

          This fix involved moving DataCacheManager init to EMF creation, rather than performing double checked locking in OpenJPAConfigurationImpl.

          Show
          Rick Curtis added a comment - Committed revision 940490 to trunk. This fix involved moving DataCacheManager init to EMF creation, rather than performing double checked locking in OpenJPAConfigurationImpl.
          Hide
          Michael Dick added a comment -

          Closing issues which have been resolved for some time. If the problem persists, please reopen.

          Show
          Michael Dick added a comment - Closing issues which have been resolved for some time. If the problem persists, please reopen.
          Hide
          Alexander Riss added a comment -

          there still is an issue with the initialization when done concurrently:

          The dataCacheManager is constructed AND published here:
          https://github.com/apache/openjpa/blob/ee299cc0bd0942ef8da2156c36e342a443bb46a0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java#L685

          this means that it can then be read in line 683 before initialize is called

          Show
          Alexander Riss added a comment - there still is an issue with the initialization when done concurrently: The dataCacheManager is constructed AND published here: https://github.com/apache/openjpa/blob/ee299cc0bd0942ef8da2156c36e342a443bb46a0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java#L685 this means that it can then be read in line 683 before initialize is called
          Hide
          Rick Curtis added a comment -

          > there still is an issue with the initialization when done concurrently:

          Please explain further?

          As I mentioned, DataCacheManager init happens at EMF creation and that operation by nature is single threaded. Are you seeing a problem, or just scanning for double checked locking?

          Show
          Rick Curtis added a comment - > there still is an issue with the initialization when done concurrently: Please explain further? As I mentioned, DataCacheManager init happens at EMF creation and that operation by nature is single threaded. Are you seeing a problem, or just scanning for double checked locking?

            People

            • Assignee:
              Rick Curtis
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development