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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        16h 31m 1 Rick Curtis 10/Mar/10 15:47
        Resolved Resolved Reopened Reopened
        9d 3h 59m 1 Rick Curtis 19/Mar/10 19:46
        Reopened Reopened Resolved Resolved
        21d 21h 54m 1 Donald Woods 10/Apr/10 18:41
        Resolved Resolved Closed Closed
        12d 2h 48m 1 Donald Woods 22/Apr/10 21:30
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Donald Woods made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Rick Curtis made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        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.
        Rick Curtis made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Rick Curtis made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        Hide
        Rick Curtis added a comment -

        Committed revision 921410 to trunk.

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development