When doing a background reindex in Jira 8.13, it is slower than background reindex operations in older Jira versions (in this example, we used 8.8.1).
- Deploy Jira 8.13 & Jira 8.8.1
- Use data generator to create 60k+ issues with ~15 comments each
- Perform a lock and reindex operation on both instances (as background reindex won't be available due to the discrepancies between the jiraissue table and the index issue count)
- Perform a background reindex and compare the results between them
The time to complete the reindex should be similar between two Jira instances in the same product release (8 in this case).
Jira 8.13 takes at least twice the time.
After upgrading to JIRA 8.10.0 and later, including the LTS release 8.13.0, the new background reindex process works differently. All index updates are checking the version of the entity in the index. This guarantees index consistency when there are concurrent index updates. Previously, any concurrent user actions modifying those entities would be potentially overwritten (in the index) by the old data. So a task was executed in the end of the background re-index process to try to fix that possible inconsistent index.
However, with versioning background reindex introduced in Jira 8.10, we do a conditional update when updating the index like any other user action modifying the index. Thus we have a consistent index but with a slightly higher cost. This check happens for each item and during this, the index is constantly flushed to the disk.
Further information has been provided at the KB below: https://confluence.atlassian.com/jirakb/background-reindex-is-slow-after-upgrading-to-jira-8-10-and-later-1027126085.html
Also, please check
JRASERVER-72196 for some improvement in this area.