Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-22612

[GSS](7.4.z) contention due to the synchronized block in TimerServiceImpl.getTimers()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.4.3.CR1, 7.4.3.GA
    • 7.4.2.GA
    • EJB
    • None

      Current TimerServiceImpl uses a HashMap to keep all timers and synchronize all read/write access to it. When there are a large number of timers, and the application keeps calling getTimers() method, the iteration over all timers can take long timer and block other threads' operations, such as creating new timer, getting individual timer, timer expiring, cancelling timer, and listing timers.

      Considering the large amount of read access, we should consider replacing the HashMap with a ConcurrentHashMap, while making sure all access to the timers cache are atomic.

              rhn-engineering-lgao Lin Gao
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: