Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-25334

Scrum board backlog may load all issues and potentially trigger a DB query for each issue

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a 1k issues in a project (TEST) with non-empty "team" (Advanced Roadmaps for Jira) field
      2. Create a scrum board (TEST-BOARD) with the following filter: "project = TEST ORDER BY Rank ASC"
      3. Add "team" to "Card Layout"
      4. Open TEST-BOARD backlog

      Expected Results

      Board should open in a reasonable time and only load issues (and custom filed values) presented in the board

      Actual Results

      Board loads all (1000k) issues (including custom field values) where for "team" field this will trigger 2 sql query to the DB for every issue. 

       

      "http-nio-8090-exec-15 url: /jira/rest/greenhopper/1.0/xboard/plan/backlog/data.json; user: admin@76309" daemon prio=5 tid=0x23 nid=NA runnable
        java.lang.Thread.State: RUNNABLE
            at com.atlassian.rm.common.env.issues.JiraIssuePropertyService.get(JiraIssuePropertyService.java:48)
            at com.atlassian.rm.common.env.issues.JiraIssuePropertyService.get(JiraIssuePropertyService.java:36)
            at com.atlassian.rm.teams.customfields.team.TeamIssuePropertyService.getTeamId(TeamIssuePropertyService.java:25)
            at com.atlassian.rm.teams.customfields.team.IssueTeamService.getTeamForIssue(IssueTeamService.java:60)
            at com.atlassian.rm.teams.customfields.team.IssueTeamService.getTeam(IssueTeamService.java:44)
            at com.atlassian.rm.teams.customfields.team.TeamCustomFieldTypeHelper.getTeam(TeamCustomFieldTypeHelper.java:179)
            at com.atlassian.rm.teams.customfields.team.TeamCustomFieldType.getValueFromIssue(TeamCustomFieldType.java:142)
            at com.atlassian.rm.teams.customfields.team.TeamCustomFieldType.getValueFromIssue(TeamCustomFieldType.java:34)
            at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:354)
            at com.atlassian.jira.issue.DocumentIssueImpl.getCustomFieldValue(DocumentIssueImpl.java:350)
            at com.atlassian.jira.issue.fields.ImmutableCustomField.getRendererCustomFieldValue(ImmutableCustomField.java:820)
            at com.atlassian.jira.issue.fields.ImmutableCustomField.getColumnViewHtml(ImmutableCustomField.java:815)
            at com.atlassian.greenhopper.web.rapid.list.ExtraFieldsHelper.createColumnViewEntry(ExtraFieldsHelper.java:143)
            at com.atlassian.greenhopper.web.rapid.list.ExtraFieldsHelper.renderField(ExtraFieldsHelper.java:123)
            at com.atlassian.greenhopper.web.rapid.list.ExtraFieldsHelper.renderFields(ExtraFieldsHelper.java:81)
            at com.atlassian.greenhopper.web.rapid.list.ExtraFieldsCallbackComponent.processFieldData(ExtraFieldsCallbackComponent.java:33)
            at com.atlassian.greenhopper.web.rapid.list.RapidIssueEntryCallback.createVisibleEntry(RapidIssueEntryCallback.java:222)
            at com.atlassian.greenhopper.web.rapid.list.RapidIssueEntryCallback.fieldData(RapidIssueEntryCallback.java:189)
            at com.atlassian.greenhopper.service.issue.callback.AbstractCompoundDataCallback.issueComplete(AbstractCompoundDataCallback.java:41)
            at com.atlassian.greenhopper.service.issue.callback.ComposedIssueDataCallback.issueComplete(ComposedIssueDataCallback.java:64)
            at com.atlassian.greenhopper.service.issue.IssueDataLoader.collect(IssueDataLoader.java:65)
            at com.atlassian.greenhopper.service.issue.IssueDataLoader.collect(IssueDataLoader.java:38)
            at com.atlassian.greenhopper.service.issue.IssueDataServiceImpl$$Lambda$5007.486276621.accept(Unknown Source:-1)
            at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
            at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
            at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
            at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
            at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
            at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
            at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
            at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
            at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
            at com.atlassian.greenhopper.service.issue.IssueDataServiceImpl.findImpl(IssueDataServiceImpl.java:170)
            at com.atlassian.greenhopper.service.issue.IssueDataServiceImpl.findAndSortWithServiceOutcome(IssueDataServiceImpl.java:93)
            at com.atlassian.greenhopper.web.rapid.list.RapidIssueEntryQueryServiceImpl.collectIssues(RapidIssueEntryQueryServiceImpl.java:823)
            at com.atlassian.greenhopper.web.rapid.list.RapidIssueEntryQueryServiceImpl.collectPlanModeIssues(RapidIssueEntryQueryServiceImpl.java:373)
            at com.atlassian.greenhopper.web.rapid.plan.PlanningModeServiceImpl.getBacklogIssuesAndSprintAssignment(PlanningModeServiceImpl.java:92)
            at com.atlassian.greenhopper.web.rapid.plan.PlanningModeHelper.loadNewBacklogData(PlanningModeHelper.java:130)
            at com.atlassian.greenhopper.web.rapid.plan.PlanningModeResource.lambda$getBacklogData$0(PlanningModeResource.java:106)
            at com.atlassian.greenhopper.web.rapid.plan.PlanningModeResource$$Lambda$4972.214327275.call(Unknown Source:-1)
            at com.atlassian.greenhopper.web.util.RestCall.response(RestCall.java:38)
            at com.atlassian.greenhopper.web.AbstractResource.createResponse(AbstractResource.java:87)
            at com.atlassian.greenhopper.web.AbstractResource.response(AbstractResource.java:69)
            at com.atlassian.greenhopper.web.rapid.plan.PlanningModeResource.getBacklogData(PlanningModeResource.java:96)
            at sun.reflect.GeneratedMethodAccessor1694.invoke(Unknown Source:-1)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker.lambda$_dispatch$0(DispatchProviderHelper.java:181)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$$Lambda$3597.2133231141.invoke(Unknown Source:-1)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.lambda$invokeMethodWithInterceptors$0(DispatchProviderHelper.java:81)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$$Lambda$3598.1160152725.intercept(Unknown Source:-1)
            at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
            at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:42)
            at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:106)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:180)
      ...
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
            at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
            at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:748) 

      Workaround

      Remove expensive custom fields (example: team) form Card Layout

       

              71bdbafbe765 Aryan Chaubal
              mswinarski Maciej Swinarski (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: