Good day,
We have been able to investigate in deep this issue and here you have what we found:
- There is a DB table called "AO_8542F1_IFJ_OBJ_JIRAISSUE" that keeps track of all issues related which each Asset object.
- This table is indexed with Asset index.
- When you restart Jira with the options Persist Insight index to file and Restore Assets index from file (even if you have increased the shutdown time and the file is saved on time as support probably has suggested) if only one new ticket is created with an Assets customField, this will be reflected in the mentioned table.
- Due to that, there is a mismatch in the objects present in the DB and in the index, therefore, the index is discarded and recreated again.
- In our case, we had more than 7 million objects related with this connections (7 million that should be reindexed!!!).
- We have done this in our DEV, PRE and PRO environment:
- Shut down JIRA
- Clear the DB table (you can delete all or all but some issue types - DO NOT DROP THE TABLE, ONLY THE ROWS).
- Start Jira
I would not recommend anybody to modify tables directly from DB, neither Atlassian support, but in our case, the reindex time was reduced from 30-40 min to 1 min, so I can certainly point to this issue as the one causing the incredible slow Asset index time.
Hope this information is useful for someone, take this into account when deleting the information:
- Cross search in JQL is still posible: customfield_XXX in aqlFunction(XXXX) OK
- Searches in AQL for the cases you have deleted will no longer be available: connectedTickets(XXXXX) KO
- Related Jira issues at the right in Assets view will disappear KO
Thank you and kind regards,
Gonzalo.
QUERY TO CLEAR THE DB BUT SOME ISSUE TYPES (change it based on your IDs):
DELETE FROM "AO_8542F1_IFJ_OBJ_JIRAISSUE"
USING "jiraissue"
WHERE "AO_8542F1_IFJ_OBJ_JIRAISSUE"."JIRA_ISSUE_ID" = "jiraissue"."id" AND
"jiraissue"."issuetype" IN ('10001','10100','14000','14100','14500','10200','11100','12500','13100','10004');
Thank you very much Gonzalo,
In our case (v9.12.4), we have 45 million objects related to 3 million tickets. 45 million that are reindexed on each restart. It takes more than 4h30m reindexing. While reindexing is running, no values are displayed in asset customfields.
This is not a suggestion. This is an important and determining bug.
In addition to this issue, with a significant volume of connectedTickets, there are performance issues when accessing asset views.