OpenJPA
  1. OpenJPA
  2. OPENJPA-1379

Locking problem when using timestamp QueryCache eviction policy.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M3
    • Fix Version/s: 2.0.0-beta
    • Component/s: datacache
    • Labels:
      None

      Description

      I ran into a bug in AbstractQueryCache when using the timestamp QueryCache eviction policy. This is only a problem when running in a multithreaded environment.

      The net of the problem is that in AbstractQueryCache.onTypesChanged(TypesChangedEvent ev) we call writeLock(), but when using the non-default eviction policy we never call writeUnlock(). As a result, any other threads requesting a writeLock on the cache will block indefinitely.

        Issue Links

          Activity

          Rick Curtis created issue -
          Rick Curtis made changes -
          Field Original Value New Value
          Link This issue is part of OPENJPA-738 [ OPENJPA-738 ]
          Rick Curtis made changes -
          Fix Version/s 2.0.0-M4 [ 12314149 ]
          Affects Version/s 2.0.0-M4 [ 12314149 ]
          Hide
          Rick Curtis added a comment -

          This issue is fixed in trunk.

          Show
          Rick Curtis added a comment - This issue is fixed in trunk.
          Rick Curtis made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development