OpenJPA
  1. OpenJPA
  2. OPENJPA-1559

DataCacheManager initialization isn't thread safe.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: datacache
    • Labels:
      None

      Description

      When running normally, some of OpenJPA configuration is lazily loaded and is not thread safe. Normally this isn't an issue if one thread has a different configured object than another.

      Today I came across a problem when using the DataCache EvictionScheduler that multiple scheduler threads can get created and kicked off.

        Activity

        Hide
        Donald Woods added a comment -

        Code checked into 2.0.0, so marking it resolved for the release notes.
        If more work is required, please open a new issue and link it to this one.

        Show
        Donald Woods added a comment - Code checked into 2.0.0, so marking it resolved for the release notes. If more work is required, please open a new issue and link it to this one.
        Hide
        Rick Curtis added a comment -

        Reducing severity as this seems fairly hard to reproduce and doesn't have that large of an impact.

        Show
        Rick Curtis added a comment - Reducing severity as this seems fairly hard to reproduce and doesn't have that large of an impact.
        Hide
        Rick Curtis added a comment -

        The change that I committed (rev. 921410) relies on double checked locking with a primitive which I thought was safe to do.... but it appears that TestDataCacheScheduler.testMultithreadedInitialization fails intermittently on a larger test machine. To date I've been unable to recreate this problem on my dev machine.

        It appears that my fix still has a small window where this problem exists. Reopening to investigate at a later date.

        Show
        Rick Curtis added a comment - The change that I committed (rev. 921410) relies on double checked locking with a primitive which I thought was safe to do.... but it appears that TestDataCacheScheduler.testMultithreadedInitialization fails intermittently on a larger test machine. To date I've been unable to recreate this problem on my dev machine. It appears that my fix still has a small window where this problem exists. Reopening to investigate at a later date.
        Hide
        Rick Curtis added a comment -

        Committed revision 921410 to trunk.

        Show
        Rick Curtis added a comment - Committed revision 921410 to trunk.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development