Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-5681

Non-optimal computation of SLA values in addDocumentFields() method

XMLWordPrintable

      Summary

      During issue reindexing Jira loads all related CustomField (CF). When you have ServiceDesk installed, its CF are global. In case of SLA CF, for each index event Jira will call SLACustomFieldIndexer.addDocumentFields() method for each CF.
      Mentioned method tries to load SLA values from DB, even in case issue is not related to ServiceDesk, that makes ServiceDesk issue indexing slow due to additional computation.

      Environment

      • Jira Core
      • Jira ServiceDesk
      • Large number (100+) of Service Desk SLA CF
        select count(*) from customfield where customfieldtypekey like '%sd-sla%';
        

      Steps to Reproduce

      1. Run FullReindex
      2. Measure time and monitor DB traffic

      Expected Results

      Issue reindex is not affected by SD project

      Actual Results

      • Issue reindex time is affected by SD project, increased time 2x
      • Large number of SQL request to DB

      Notes

      • addDocumentFields() loads values from CF from DB, loads it to cache and then check if it needs them
      • Taking into account that SD SLA fields are global, Jira is going to call addDocumentFields() for each issue.
      • And due to cache flush in getValueFromIssue() (see JSDSERVER-5685) this has a bigger impact on whole Jira performance.
      • So problem is multiplication of NumberOfIssues * NumberOfSLA * CostOfSQL

      Workaround

      None

              szaporozhtsev Sergey Zaporozhtsev (Inactive)
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: