Details
-
Bug
-
Status: Reopened
-
Minor
-
Resolution: Unresolved
-
Xray DC 8.4.3, Xray DC 8.4.6
-
None
-
None
-
- Xray Data Center 8.4.6 (customer) / 8.4.3 (internal reproduction)
- Jira Data Center 11.3.x
- Search platform: Lucene with the com.atlassian.jira.lucene.search.limit feature flag enabled
Description
Description
When the saved filter passed to testExecutionTests(<filter>) returns more issues than jira.search.platform.max.result.window (Jira default 10,000), the function only processes part of the filter results. No error is shown in the UI or written to the log.
Jira itself rejects such searches with "Search limit exceeded. We couldn't complete your search because it requests N results which exceeded the search platform limit of X". Xray appears to catch this error and continue with whatever results it had fetched before the error.
With issue not in testExecutionTests(<filter>), the query then returns Tests that do have Test Runs in the filter's Test Executions. For a query used to find unexecuted Tests, this means wrong results that look valid.
Pre-conditions
How to reproduce
- Create 20 Tests and 20 Test Executions (1 Test each, finished PASS run).
- Save a filter returning the 20 Test Executions.
- Run issue in testExecutionTests(<filter>): 20 Tests. Run ... AND issue not in testExecutionTests(<filter>): 0 Tests. (correct)
- Add jira.search.platform.max.result.window=5 to jira-config.properties and restart Jira.
- Enable the dark feature com.atlassian.jira.lucene.search.limit.enabled (not needed on OpenSearch).
- Control: a plain REST search requesting 10 results fails with "Search limit exceeded ... limit of 5" (expected Jira behaviour).
- Run issue in testExecutionTests(<filter>) again.
Actual result/Attachments
- issue in testExecutionTests(<filter>) returns 0 Tests, no error.
- issue not in testExecutionTests(<filter>) returns all 20 Tests.
- filter = <filter> alone still returns 20.
In production (default window of 10,000, filter with 24,943 Test Executions), the function processed exactly 10,000 executions. The Xray debug log shows 10 TestRunDAOImpl queries of 1,000 execution IDs each, and no exception.
Expected result
- The function processes all issues returned by the saved filter, e.g. by reading it with the Jira searchStream API that Atlassian recommends for large result sets. Or, at minimum,
- the "Search limit exceeded" error is surfaced to the user instead of being swallowed, so results are never silently incomplete.
Version
- Xray Data Center 8.4.6 (customer) / 8.4.3 (internal reproduction)
- Jira Data Center 11.3.x
Workaround
* Split the saved filter into several filters that each stay below the platform limit (e.g. by created date range, created >= X AND created < Y) and chain one issue not in testExecutionTests(...) clause per filter. No config change needed. Each part must be kept under the limit as it grows.
Attachments
Issue Links
- duplicates
-
XDC-1297 Loading...