issuefunction in expression continually running

David Williams May 14, 2015

After running a query including the following query

issuefunction in expression("", "assignee != reporter")

The query was started at 15:00.  Completed in about 30s but the following threads didn't complete until around 16 minutes later.  Actually I was able to run the same query again, which compounded the issue.  (one of our users in production did this 12 times! which caused JIRA to become unstable for nearly 30 min)

The thread takes a long time to stop (even after the query has returned it's results) and the following is posted repeatedly to the "atlassian-jira-slow-queries.log"

 

2015-05-14 15:16:08,320 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1655' ms to run.

2015-05-14 15:16:08,862 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1419' ms to run.

2015-05-14 15:16:09,933 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1556' ms to run.

2015-05-14 15:16:10,251 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1310' ms to run.

2015-05-14 15:16:11,590 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1599' ms to run.

2015-05-14 15:16:11,634 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1324' ms to run.

1 answer

0 votes
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2015

Well, this term (issuefunction in expression("", "assignee != reporter")) will be evaluated against all issues - that is why it is slow. You should always add a subquery to it:

issuefunction in expression("Project =ABC", "assignee != reporter")

Then it will evaluate the expression "assignee != reporter" it only against those issue found in the subquery. This should speed up your query.

BTW: I think this is a scriptrunner JQL function (not jtricks)

Suggest an answer

Log in or Sign up to answer