Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-15112

Introduce search performance improvements for "Request Participants" field

    XMLWordPrintable

Details

    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem

      With a very large number of groups (esp. Nested Groups) search for Request Partipants on JSM projects (/rest/servicedesk/1/servicedesk/sd-user-search/participants) is slow and prone to timeouts.

      • Threads are stuck waiting for the DB to respond as we send the search request to to backend with every keystroke of the user:

      • Requests are mostly stuck looking for getGroupsForUser
      "https-openssl-nio-x.x.x.x-443-exec-289 url: /rest/servicedesk/1/servicedesk/sd-user-search/participants; user: xxxxx" #3725655 daemon prio=5 os_prio=0 cpu=268062.50ms elapsed=140127.38s tid=0x00000002c3441000 nid=0x2038 runnable  [0x00000002c55e1000]
         java.lang.Thread.State: RUNNABLE
      	at java.net.SocketInputStream.socketRead0(java.base@11.0.13/Native Method)
      ...
      	at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6616)
      	- locked <0x00000007c3380450> (a com.microsoft.sqlserver.jdbc.TDSReader)
      	at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7804)
      ....
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3488)
      	- locked <0x00000007f1fc1828> (a java.lang.Object)
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:3534)
      ...
      	at com.atlassian.crowd.directory.AbstractInternalDirectory.searchUsers(AbstractInternalDirectory.java:702)
      	at com.atlassian.crowd.directory.AbstractForwardingDirectory.searchUsers(AbstractForwardingDirectory.java:141)
      	at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.searchUsers(DirectoryManagerGeneric.java:328)
      ..
      	at com.atlassian.crowd.manager.application.search.DirectoryManagerSearchWrapper.searchUsers(DirectoryManagerSearchWrapper.java:46)
      	at com.atlassian.crowd.manager.application.search.DirectoryManagerSearchWrapper.search(DirectoryManagerSearchWrapper.java:37)
      ...
      	at com.atlassian.crowd.manager.application.search.AbstractInMemoryMembershipSearchStrategy.createSearcher(AbstractInMemoryMembershipSearchStrategy.java:59)
      	at com.atlassian.crowd.manager.application.search.AbstractInMemoryMembershipSearchStrategy.searchGroupRelationships(AbstractInMemoryMembershipSearchStrategy.java:50)
      	at com.atlassian.crowd.manager.application.search.AbstractInMemoryMembershipSearchStrategy.searchNestedGroupRelationships(AbstractInMemoryMembershipSearchStrategy.java:46)
      ...
      	at com.atlassian.jira.security.groups.DefaultGroupManager.getGroupsForUser(DefaultGroupManager.java:411)
      ....
      	at com.atlassian.jira.application.DefaultApplicationRoleManager.hasAnyRole(DefaultApplicationRoleManager.java:358)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.shouldUserHaveAccess(ApplicationRequiredPermissionManager.java:238)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.checkUserHasApplicationOrFalse(ApplicationRequiredPermissionManager.java:201)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.hasPermission(ApplicationRequiredPermissionManager.java:106)
      ..
      	at com.atlassian.servicedesk.internal.user.permission.ServiceDeskLicenseAndPermissionServiceImpl.canViewPortal(ServiceDeskLicenseAndPermissionServiceImpl.java:108)
      	at com.atlassian.servicedesk.internal.user.permission.ServiceDeskLicenseAndPermissionServiceImpl.canViewPortalPermissionFixTransition(ServiceDeskLicenseAndPermissionServiceImpl.java:310)
      ...
      	at com.atlassian.servicedesk.internal.feature.customer.user.CustomerServiceValidatorImpl.isCustomerForProject(CustomerServiceValidatorImpl.java:51)
      	at com.atlassian.servicedesk.internal.feature.reqparticipants.validation.RequestParticipantValidatorImpl.canUserBeParticipantOnProject(RequestParticipantValidatorImpl.java:75)
      ...
      *strong text*
      
      • HAR File reveals network requests running for a long time before timing out:

      Suggested Solution

      Implement similar improvement as with Multi User Picker improvements introduced via JRASERVER-32092 where we reduced the depth of the search since there's no real control over the environment's Nested Group depth.

      Why This Is Important

      Having the reliable ability for JSM Agents/Collaborators to add request participants in large customer environments is one crucial element for JSM DC to be successful.

      Workaround

      As a workaround, disabling Nested Groups from all User Directories helps reduce the load on Jira doing the user lookup with getGroupsForUser

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smitra2@atlassian.com Suddha
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync