Performance problems when sorting by custom field

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The result of searches take long time to complete when sorting by custom field and JIRA instance may run into frequent GCs.

Thread dumps contain com.atlassian.jira.issue.search.parameters.lucene.sort.DocumentSortComparatorSource$InternalFieldComparator which has a refence to a huge com.atlassian.jira.issue.Issue array.:

"http-bio-8090-exec-24" daemon prio=5 tid=7fdb10959800 nid=0x11a0f7000 runnable [11a0ed000]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
...
    at com.atlassian.jira.issue.fields.CustomFieldImpl$CustomFieldIssueSortComparator.compare(CustomFieldImpl.java:1974)
    at com.atlassian.jira.issue.search.parameters.lucene.sort.DefaultIssueSortComparator.compare(DefaultIssueSortComparator.java:37)
    at com.atlassian.jira.issue.search.parameters.lucene.sort.DocumentSortComparatorSource$InternalFieldComparator.compareBottom(DocumentSortComparatorSource.java:89)
    at org.apache.lucene.search.TopFieldCollector$MultiComparatorNonScoringCollector.collect(TopFieldCollector.java:404)
    at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:575)

Cause

This issue is caused by a know bug: JRA-31666 - Getting issue details... STATUS

Workaround

  • Remove the sorting by custom field from the search filters;
  • Watch the bug report for further updates.

Last modified on Apr 7, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.