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

ViewIssue very slow when issue navigator is sorted by calculated customfield

    XMLWordPrintable

Details

    • We collect Jira 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

      The problem can be reproduced live on jira.atlassian.com.
      1) Open All resolved bugs navigator
      2) Add field "Since last comment"
      3) Sort by "Since last comment"
      4) Try to view any Issue.

      Although it does not kill the server I bet it takes lot of CPU.

      (original description from support.atlassian.com)
      The problem found in JIRA 3.6.4, 3.6.5 and also 3.7 beta 2.

      How to reproduce
      1) Put a calculated custom field on IssueNavigator.
      2) Open IssueNavigator for large set of issues (in my case 857 is enough)
      3) Sort IssueNavigator by the custom field. Sorting works fine, see sort_navigator_by_customfield.txt
      4) View arbitrary issue from IssueNavigator. There we have a problem, see ViewIssue.txt

      As you can see "Searching and sorting with HitCollector" takes unreasonable amount of time.

      As far as I understood, the problem is in NextPrevious list generation:
      com/atlassian/jira/web/action/issue/ViewIssue.java doExecute() calls getPagerManager().updatePager(getSearchRequest(), getRemoteUser()); (line 206 in 3.6.4 source)
      This method fetches all issue keys from active filter for NextPrevious Pager.
      LuceneSearchProvider.SearchAndSort() generates set of "hits" . Afterwards hits are collected.
      This line is the deepest level where I dag in : hitCollector.collect(hits.doc). During retrieval of documents (issue Keys) method doc() regularly freezes (something like after every batch of 100 records).

      Reindexing does not help.

      Sorting by calculated custom fields is very useful. For example sorting by overdue calculated field. We have ~26000 issues in production environment and there is very hi probability for this problem to happen. This problem freezed server by overloading CPU for couple of minutes.

      Regards

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              31d2e5bf7d17 Uldis Anšmits
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: