-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.7, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0
-
8
-
Severity 3 - Minor
-
7
-
-
Summary of behavior:
The customer page can be slow to load the list of customers if the background search for agents does not complete in a timely manner.
- When loading the customer page, JIRA Service Desk will search for agents so that agents can be excluded from the list of customers.
Contributing Factors:
- JIRA instance has hundreds or thousands of users with agent license
- Agents are members of many nested groups
- Customer Organizations are enabled (always enabled in JSD 3.3 and newer)
Explanation of delay:
- JSD gets a list of groups that give agent permission
- Checks each user in each group to make sure they are active and that they have application access
- The number of agents in the instance directly relates to the number of users that will be searched. More agents result in more users being searched, causing a longer delay.
- The check for application access retrieves group membership for the user, including nested group membership.
- The search of nested groups can cause the search to take longer than it would otherwise.
Steps to reproduce:
- Create JIRA Service Desk instance with 1000s of agents who are members of multiple nested groups
- Attempt to load customers page
- Observe delay
- Compare with JSD 3.2 which did not perform this agent search when loading customer page.
Example stacktrace:
"http-nio-8080-exec-19 url:/rest/servicedesk/1/pages...arch username:username " #296 daemon prio=5 tid=0x00007f4f70008800 nid=0x1bef0 runnable [0x00007f3ff7bf7000] java.lang.Thread.State: RUNNABLE at java.util.LinkedHashMap.afterNodeInsertion(LinkedHashMap.java:299) at java.util.HashMap.putVal(HashMap.java:664) at java.util.HashMap.put(HashMap.java:612) at java.util.HashSet.add(HashSet.java:220) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.findNestedGroupMembershipsIncludingGroups(RemoteDirectorySearcher.java:316) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.findNestedGroupMembershipsOfUser(RemoteDirectorySearcher.java:347) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.getParentDirectoryEntities(RemoteDirectorySearcher.java:235) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.getRelatedDirectoryEntities(RemoteDirectorySearcher.java:220) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.searchNestedGroupRelationships(RemoteDirectorySearcher.java:195) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.searchNestedGroupRelationships(DirectoryManagerGeneric.java:917) at com.atlassian.crowd.manager.application.SingleDirectorySearchStrategy.searchNestedGroupRelationships(SingleDirectorySearchStrategy.java:93) at com.atlassian.crowd.manager.application.AbstractInMemorySearchStrategy.doNestedDirectoryMembershipQuery(AbstractInMemorySearchStrategy.java:143) at com.atlassian.crowd.manager.application.InMemoryNonAggregatingSearchStrategy.searchNestedGroupRelationships(InMemoryNonAggregatingSearchStrategy.java:193) at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.searchNestedGroupRelationships(ApplicationServiceGeneric.java:2280) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.searchNestedGroupRelationships(CrowdServiceImpl.java:286) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.search(CrowdServiceImpl.java:200) at com.atlassian.jira.security.groups.DefaultGroupManager.getGroupsForUser(DefaultGroupManager.java:393) ... at com.atlassian.jira.security.groups.RequestCachingGroupManager.getGroupNamesForUser(RequestCachingGroupManager.java:188) at com.atlassian.jira.security.groups.RequestCachingGroupManager.getGroupNamesForUser(RequestCachingGroupManager.java:193) at com.atlassian.jira.security.DefaultGlobalPermissionManager.loadPermissions(DefaultGlobalPermissionManager.java:332) at com.atlassian.jira.security.DefaultGlobalPermissionManager.hasPermissionIgnoreRecovery(DefaultGlobalPermissionManager.java:347) at com.atlassian.jira.security.DefaultGlobalPermissionManager.hasPermission(DefaultGlobalPermissionManager.java:289) ... at com.atlassian.servicedesk.internal.permission.group.ServiceDeskAgentPermissionManagerImpl.hasJiraAccess(ServiceDeskAgentPermissionManagerImpl.java:96) at com.atlassian.servicedesk.internal.permission.group.ServiceDeskAgentPermissionManagerImpl.doGetUsersWithAgentLicense(ServiceDeskAgentPermissionManagerImpl.java:81) at com.atlassian.servicedesk.internal.permission.group.ServiceDeskAgentPermissionManagerImpl.getActiveUsersWithAgentLicense(ServiceDeskAgentPermissionManagerImpl.java:50) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentManager.getAllAgentsWithLimit(AgentManager.scala:92) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentManager.getAllAgents(AgentManager.scala:107) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentManager.getAgentsByProject(AgentManager.scala:67) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentService$$anonfun$getAgentsByProjectScala$2.apply(AgentService.scala:62) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentService$$anonfun$getAgentsByProjectScala$2.apply(AgentService.scala:60) at scalaz.$bslash$div.map(Either.scala:111) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentService.getAgentsByProjectScala(AgentService.scala:60) at com.atlassian.servicedesk.internal.feature.usermanagement.AgentService.getAgentsByProject(AgentService.scala:67) at com.atlassian.servicedesk.internal.rest.customers.CustomersPageDataProvider.getExcludedAgents(CustomersPageDataProvider.java:257) at com.atlassian.servicedesk.internal.rest.customers.CustomersPageDataProvider.getExcludedAgentsAndMembersInOrganizations(CustomersPageDataProvider.java:247) at com.atlassian.servicedesk.internal.rest.customers.CustomersPageDataProvider.performGetData(CustomersPageDataProvider.java:237)
Workaround
Agents may add customers and search for customers without waiting for the customer list to load.
Methods to reduce the delay include:
- Reduce number of agents in instance
- Discontinue use of nested groups, or reduce amount of nesting so search will be quicker.
- is related to
-
JRASERVER-67502 RequestCachingGroupManager may accumulate too many objects in RequestCache during processing large user sets
- Closed
-
SDENG-640 Loading...
- relates to
-
JSDSERVER-3357 JIRA performance is degraded when using an Agent based license with lots of Agents
- Closed
-
JSDSERVER-5884 Searching for users in the 'Invite team' dialog can lead to memory pressure and OutOfMemoryError in some situations
- Closed
-
JSDSERVER-5677 When a Service Desk user is granted a Service Desk license and is part of the Service Desk Team role, this user does not show in the Customers list
- Gathering Impact
-
PSR-204 Loading...
- is cloned by
-
JSMDC-2829 Loading...
- links to