Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-69296

ReIndexing reporting wrong numbers on Jira Datacenter with Archived projects

    • 7.13
    • 35
    • Severity 2 - Major
    • 200
    • Hide

      Dear Customers,

      problem is caused by multiple factors and at this point we believe we fixed the cause of the cache inconsistency. We will introduce a bugfix in 8.5.0 and into 8.4.2 versions.
      That being said, we are not fully sure if we covered all possible cases. Therefore, we would like to monitor the problem and won’t be closing issue yet.

      Regards,
      Marcin (Jira Developer)

      Show
      Dear Customers, problem is caused by multiple factors and at this point we believe we fixed the cause of the cache inconsistency. We will introduce a bugfix in 8.5.0 and into 8.4.2 versions. That being said, we are not fully sure if we covered all possible cases. Therefore, we would like to monitor the problem and won’t be closing issue yet. Regards, Marcin (Jira Developer)

      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

      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:

      1. As a workaround to clear the cache, create a new empty project, an issue on that project, then archive the project.
      2. 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.

            [JRASERVER-69296] ReIndexing reporting wrong numbers on Jira Datacenter with Archived projects

            Adrian Castillo made changes -
            Remote Link Original: This issue links to "FLASH-1411 (Bulldog)" [ 431035 ] New: This issue links to "FLASH-1411 (JIRA Server (Bulldog))" [ 431035 ]
            Eduard M made changes -
            Description Original: h3. 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:
            {code:java}
            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
            {code}
            Also the below could be seen in the logs:
            {code:java}
            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).
            {code}
            h3. 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|https://confluence.atlassian.com/jirakb/list-of-archived-projects-from-database-976763219.html]

            h3. Steps to Reproduce

            No known steps to reproduce this issue so far.
            h3. Expected Results

            Re-Indexing should finish at 100% and Jira should report the right number of issues responding to the call:
            {code:java}
            GET <JIRA_BASE_URL>/rest/api/2/index/summary
            {code}
            h3. Actual Results
             * Jira reports wrong progress while doing Re-Indexing
             * and the above call shows zero issues in archive (_"countInArchive": 0_) which is wrong:
            {code:java}
            {
              "indexReadable": true,
              "countInDatabase": 235000,
              "countInIndex": 159000,
              "countInArchive": 0,
              "lastUpdatedInDatabase": "2019-01-1T00:40:00.357+0100",
              "lastUpdatedInIndex": "2019-01-1T12:35:00.000+0100"
            }
            {code}

            h3. 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
             # 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|https://confluence.atlassian.com/display/JIRAKB/ReIndexing+reporting+wrong+numbers+on+Jira+Datacenter+with+Archived+projects].
            New: h3. 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:
            {code:java}
            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
            {code}
            Also the below could be seen in the logs:
            {code:java}
            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).
            {code}
            h3. 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|https://confluence.atlassian.com/jirakb/list-of-archived-projects-from-database-976763219.html]

            h3. Steps to Reproduce

            No known steps to reproduce this issue so far.
            h3. Expected Results

            Re-Indexing should finish at 100% and Jira should report the right number of issues responding to the call:
            {code:java}
            GET <JIRA_BASE_URL>/rest/api/2/index/summary
            {code}
            h3. Actual Results
             * Jira reports wrong progress while doing Re-Indexing
             * and the above call shows zero issues in archive (_"countInArchive": 0_) which is wrong:
            {code:java}
            {
              "indexReadable": true,
              "countInDatabase": 235000,
              "countInIndex": 159000,
              "countInArchive": 0,
              "lastUpdatedInDatabase": "2019-01-1T00:40:00.357+0100",
              "lastUpdatedInIndex": "2019-01-1T12:35:00.000+0100"
            }
            {code}

            h3. 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|https://confluence.atlassian.com/display/JIRAKB/ReIndexing+reporting+wrong+numbers+on+Jira+Datacenter+with+Archived+projects].
            set-jac-bot made changes -
            Tony D. made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 483886 ]
            Michal Warkocz made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 482622 ]
            Michal Warkocz made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 482622 ]
            Artur Faruga made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 479048 ]
            Marcin Sasinowski made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 218 New: 200
            Tony D. made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 469972 ]

              Unassigned Unassigned
              sabdelfattah Sherif Abdelfattah (Inactive)
              Affected customers:
              25 This affects my team
              Watchers:
              41 Start watching this issue

                Created:
                Updated:
                Resolved: