Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-63099

JIRA doesn't detect and report problem caused during reindexing

    XMLWordPrintable

    Details

      Description

      Summary

      JIRA reindex thread needs to obtain lock to start reindexing of the issue. If it doesn't do that for some reason it will skip this issue reindexing, but will still report that reindexing was done successfully.

      Steps to Reproduce

      1. Install plugin which generates a lot of reindexing and locks Lucene
      2. Initiate Full locked reindex

      Expected Results

      Reindex thread will have priority and get the lock. In case it doesn't get the lock, it will fail and report that to the user.

      Actual Results

      Reindex thread failed to get the lock. At this stage process should be fail and report to user.
      But thread continued to run and does incomplete reindex: Issues are not indexed, only SearchRequest and PortalPage
      Error in the logs:

      2016-11-07 08:20:29,947 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing started
      2016-11-07 08:20:29,947 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All starting...
      2016-11-07 08:20:30,003 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 0% complete. Current index: Issue
      2016-11-07 08:20:30,061 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.issue.index.DefaultIndexManager] Reindexing: {indexIssues=true, indexChangeHistory=true, indexComments=true, indexWorklogs=true}
      2016-11-07 08:21:30,096 JiraTaskExectionThread-3 ERROR admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.issue.index.DefaultIndexManager] Wait attempt timed out - waited 60000 milliseconds
      com.atlassian.jira.issue.index.IndexException: Wait attempt timed out - waited 60000 milliseconds
      	at com.atlassian.jira.issue.index.DefaultIndexManager.obtain(DefaultIndexManager.java:936)
      ...
      	at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:75)
      	at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:55)
      ...
      2016-11-07 08:21:30,097 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex took: -1ms. Indexer: DefaultIndexManager: paths: [/home/qqmthk1/ascent/jira_home/caches/indexes/comments, /home/qqmthk1/ascent/jira_home/caches/indexes/issues, /home/qqmthk1/ascent/jira_home/caches/indexes/changes, /home/qqmthk1/ascent/jira_home/caches/indexes/worklogs, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/jira-git-pullrequestinfos, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/atlassian-subversion-revisions, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/jira-git-revisions]
      
      
      2016-11-07 08:21:30,097 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex took: -1ms. Indexer: DefaultIndexManager: paths: [/home/qqmthk1/ascent/jira_home/caches/indexes/comments, /home/qqmthk1/ascent/jira_home/caches/indexes/issues, /home/qqmthk1/ascent/jira_home/caches/indexes/changes, /home/qqmthk1/ascent/jira_home/caches/indexes/worklogs, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/jira-git-pullrequestinfos, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/atlassian-subversion-revisions, /home/qqmthk1/ascent/jira_home/caches/indexes/plugins/jira-git-revisions]
      2016-11-07 08:21:30,118 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 0% complete. Current index: SearchRequest
      
      2016-11-07 08:23:16,111 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 4% complete. Current index: PortalPage
      
      2016-11-07 08:23:29,744 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex took: 119599ms. Indexer: SharedEntityIndexManager: paths: []
      2016-11-07 08:23:29,777 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 5% complete. Current index: 
      2016-11-07 08:23:29,777 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All complete. Total time: 119598ms. Reindex run: 26
      2016-11-07 08:23:29,777 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing finished
      

      Please note:

      2016-11-07 08:23:29,777 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 5% complete. Current index: 
      2016-11-07 08:23:29,777 JiraTaskExectionThread-3 INFO admin 500x3775x1 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All complete. Total time: 119598ms. Reindex run: 26
      

      Notes

      Workaround

      Check logs and retry reindex

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              drauf Daniel Rauf
              Reporter:
              ayakovlev@atlassian.com Andriy Yakovlev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: