Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-364

LinkMap API synchronizatoin windows are over-wide

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.11, 4.0.1
    • Fix Version/s: 3.0.12, 4.0.2
    • Component/s: Rule Helpers
    • Labels:
      None

      Description

      The LinkMap API methods (createLinkMap, deleteLinkMap, link, linked, unlink, linkNames, linkValues, clearLinks) all perform their relevant operations synchronized on the top level HashMap that associates map names with their underlying link map. That makes the exclusion window for these operations unnecessarily wide. Worse, it causes an unnecessary exclusion bottleneck between threads operating on independent link maps.

      The outer HashMap would be better replaced with a ConncurrentHashMap, allowing linkmap create, lookup and delete operations to operate with no risk of inappropriate exclusion. The LinkMap API methods will need ot be modified to synchronize on the HashMap used to model the link map being operated on. This will ensure that API methods only exclude competing threads when they operate on the same map and do so with as minimal an exclusion window as possible.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                adinn Andrew Dinn
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: