Cayenne
  1. Cayenne
  2. CAY-1653

Improving DefaultEventManager concurrency - non-bocking DispatchQueue

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1M3
    • Fix Version/s: 3.1B1
    • Component/s: None
    • Labels:
      None

      Description

      DefaultEventManager and related non-public classes have a bunch of synchronized methods that create problems when lots of contexts exist in the system. This task is about streamlining one important piece of this puzzle - DispatchQueue. It is a reason (not the only one unfortunately) of deadlocks described under CAY-720, CAY-957 and CAY-1652. Also getting rid of it should in theory greatly improve performance (again - in a system with lots of committing contexts).

      So switching it to concurrent collections. Specifically 'dispatchEvent' method (add/remove listener methods still require some less invasive synchronization on WeakHashMap. We may replace this one with something like com.google.common.collect.MapMaker some time later... not essential for now).

        Issue Links

          Activity

          Gavin made changes -
          Link This issue is depended upon by CAY-957 [ CAY-957 ]
          Gavin made changes -
          Link This issue blocks CAY-957 [ CAY-957 ]
          Andrus Adamchik made changes -
          Link This issue blocks CAY-957 [ CAY-957 ]
          Andrus Adamchik made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Andrus Adamchik created issue -

            People

            • Assignee:
              Andrus Adamchik
              Reporter:
              Andrus Adamchik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development