Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-65342

Flushes for activeUsersCountForLicense cache are blocking

    XMLWordPrintable

Details

    Description

      Summary

      When JIRA generates many cache flush events (see JRASERVER-64839), flushes for activeUsersCountForLicense cache are blocking and stack (wait) for each other.

      Expected Results

      Caches are not blocking

      Actual Results

      Thread dump, thread trying to flush the cache: com.atlassian.cache.ehcache.LoadingCache.removeAll

      "http-nio-8080-exec-828" #365452 daemon prio=5 os_prio=0 tid=0x00007fda18083000 nid=0x38e0 waiting on condition [0x00007fde368df000]
         java.lang.Thread.State: WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x000000055b994878> (a java.util.concurrent.locks.ReentrantReadWriteLock$FairSync)
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
      	at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:943)
      	at com.atlassian.cache.ehcache.LoadingCache.removeAll(LoadingCache.java:320)
      	at com.atlassian.cache.ehcache.DelegatingCache.removeAll(DelegatingCache.java:148)
      	at com.atlassian.jira.application.DefaultApplicationRoleManager.clearUserCounts(DefaultApplicationRoleManager.java:651)
      	at com.atlassian.jira.application.DefaultApplicationRoleManager.onGroupMembershipCreated(DefaultApplicationRoleManager.java:510)
      ....
      

      Notes

      This is fix only for specific cache activeUsersCountForLicense. See related JRASERVER-64847 for all caches.

      Workaround

      None

      Attachments

        Issue Links

          Activity

            People

              lwlodarczyk Lukasz Wlodarczyk
              mwyrzykowski Michal Wyrzykowski
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: