-
Bug
-
Resolution: Fixed
-
Low (View bug fix roadmap)
-
7.13.2, 8.0.2, 8.1.1
-
7.13
-
35
-
Severity 2 - Major
-
200
-
-
Issue Summary
Jira Datacenter is reporting wrong numbers after finishing foreground re-Indexing.
The re-Indexing finishes unexpectedly before it reaches 100% and no errors are being logged.
The following appears in the atlassian-jira.log:
2019-01-01 00:00:23,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.w.a.admin.index.IndexAdminImpl] Re-indexing started 2019-01-01 00:00:23,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.util.index.CompositeIndexLifecycleManager] Reindex All starting... 2019-01-01 00:00:23,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.index.ha.DefaultNodeReindexService] Pausing node re-index service 2019-01-01 00:00:23,647 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.w.a.admin.index.IndexAdminImpl] Re-indexing is 0% complete. Current index: Issue 2019-01-01 00:00:23,647 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.issue.index.DefaultIndexManager] ReindexAll in foreground: {indexIssues=true, indexChangeHistory=true, indexComments=true, indexWorklogs=true, forceReloadFromDatabase=false} ..... ..... 2019-01-01 01:04:26,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.w.a.admin.index.IndexAdminImpl] Re-indexing is 68% complete. Current index: 2019-01-01 01:04:26,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.util.index.CompositeIndexLifecycleManager] Reindex All complete. Total time: 3840094ms. Reindex run: 101 2019-01-01 01:04:26,624 JiraTaskExectionThread-3 INFO user1 111x11111x1 1111aaa xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/IndexReIndex.jspa [c.a.j.w.a.admin.index.IndexAdminImpl] Re-indexing finished
Also the below could be seen in the logs:
2019-01-1 12:35:00,166 http-nio-8080-exec-1 DEBUG user2 111x11111x2 1111aab xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/jira/IndexAdmin.jspa [c.a.j.issue.index.IndexConsistencyUtils] isIndexConsistent: Issue: expectedCount=235000; actualCount=159000 2019-01-1 12:35:00,166 http-nio-8080-exec-1 WARN user2 111x11111x2 1111aab xx.xx.xx.xx,xx.xx.xx.xx /secure/admin/jira/IndexAdmin.jspa [c.a.j.issue.index.IndexConsistencyUtils] Index consistency check failed for index 'Issue': expectedCount=235000; actualCount=159000 As can be seen the Index is having a big discrepancy from the number of issues got from the database (expectedCount).
Environment
- Jira Datacenter 7.10.x or later
- Having 1 or more projects in Archive.
- Unsure if you have Archived projects? See List of Archived Projects from Database
Steps to Reproduce
No known steps to reproduce this issue so far.
Expected Results
Re-Indexing should finish at 100% and Jira should report the right number of issues responding to the call:
GET <JIRA_BASE_URL>/rest/api/2/index/summary
Actual Results
- Jira reports wrong progress while doing Re-Indexing
- and the above call shows zero issues in archive ("countInArchive": 0) which is wrong:
{ "indexReadable": true, "countInDatabase": 235000, "countInIndex": 159000, "countInArchive": 0, "lastUpdatedInDatabase": "2019-01-1T00:40:00.357+0100", "lastUpdatedInIndex": "2019-01-1T12:35:00.000+0100" }
Workaround
The workaround for this issue is simple, we need to correct the values of the cache by flushing it and rebuilding the number.
This can be done by adding or removing a project.
Please follow the below steps:
- As a workaround to clear the cache, create a new empty project, an issue on that project, then archive the project.
- verify if countInArchive has changed in /rest/api/2/index/summary response.
The above issue is also described in the KB: ReIndexing reporting wrong numbers on Jira Datacenter with Archived Projects.
@Anton Can get read access to your ticket PS-53158