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

On startup, Jira logs "Issue X has empty field 'num'. Returning null for 'key'."

    XMLWordPrintable

Details

    Description

      Issue Summary

      During JIRA start there is code that attempts to recover JIRA's issues index to consistent state. As part of this process issues that are indexed but are no longer present in database are removed from index. There is a bug in that code that tries to load issues keys while they are not populated.

      This bug manifests itself by following warnings in log:

      2019-11-08 00:41:13,706 Caesium-1-2 WARN ServiceRunner     [c.a.jira.ofbiz.IssueGenericValue] Issue (id=0) has empty field 'num'. Returning null for 'key'.
      

      or

      2019-11-07 16:05:39,909 Caesium-1-1 WARN ServiceRunner     [c.a.jira.ofbiz.IssueGenericValue] Issue (id=479837) has empty field 'num'. Returning null for 'key'.
      

      Steps to Reproduce

      1. Create or delete some issues in Jira.
      2. Restart Jira. 

      Expected Results

      Index recovery should not generate errors.  This was fixed in version 6.4.5 but has resurfaced. 

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2019-11-08 00:41:13,010 Caesium-1-2 INFO ServiceRunner     [c.a.j.index.ha.DefaultIndexRecoveryManager] Latest index date: {2019-11-01 17:24:01}, Latest DB date: {2019-11-01 17:24:01}
      2019-11-08 00:41:13,011 Caesium-1-2 INFO ServiceRunner     [c.a.jira.startup.IndexRecoveryLauncher] Indexing issues from=2019-11-01 17:24:01.0 to=Fri Nov 01 17:24:01 GMT+00:00 2019 (time span of 0ms)
      2019-11-08 00:41:13,012 Caesium-1-2 INFO ServiceRunner     [c.a.jira.startup.IndexRecoveryLauncher] Progress=60%, task=Recovering, message=Recovered added and updated issues
      2019-11-08 00:41:13,580 Caesium-1-2 WARN ServiceRunner     [c.a.jira.ofbiz.IssueGenericValue] Issue (id=0) has empty field 'num'. Returning null for 'key'.
      2019-11-08 00:41:13,705 Caesium-1-2 WARN ServiceRunner     [c.a.jira.ofbiz.IssueGenericValue] Issue (id=0) has empty field 'num'. Returning null for 'key'.
      2019-11-08 00:41:13,706 Caesium-1-2 WARN ServiceRunner     [c.a.jira.ofbiz.IssueGenericValue] Issue (id=0) has empty field 'num'. Returning null for 'key'.
      ...
      2019-11-08 00:43:13,706 Caesium-1-2 INFO ServiceRunner     [c.a.jira.startup.IndexRecoveryLauncher] Progress=80%, task=Recovering, message=Cleaned removed issues
      2019-11-08 00:43:13,706 Caesium-1-2 INFO ServiceRunner     [c.a.jira.startup.IndexRecoveryLauncher] Finished start-index-recovery
      

      Notes

      • This is safe to ignore those messages in the context of Index recovery
      • In another context it might indicate a problem.

      Workaround

      To temporary resolve, run the database integrity checker and then a full Lock & Rebuild of the index.  

      Attachments

        Issue Links

          Activity

            People

              sutecht Seth Utecht (Inactive)
              samann Sarah A
              Votes:
              7 Vote for this issue
              Watchers:
              42 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: