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

WebHooks plugin fetches custom field data from the database twice, causing performance issues

    XMLWordPrintable

Details

    Description

      Issue Summary

      Whenever WebHooks are triggered, during the process of building a JSON body to be sent, Jira will fetch data for certain fields directly at the database (e.g. fields from Advanced Roadmaps).

      The implementation of this mechanic, returns Iterable of custom fields definitions + function retrieving data for them. It is then called two times separately to create two different data structures. It is not necessary, because data structures are not filtering the output, they are just retrieving custom fields' names.

      When a significant amount of WebHooks is set to be triggered on issue operations, this can increase the time Jira will take to finish executing issue actions, causing performance issues for end users.

      Steps to Reproduce

      1. Set up a Jira instance with Advanced Roadmaps
      2. Populate a Jira issue with Advanced Roadmaps fields (e.g. Target start and Target end)
      3. Create a few WebHooks set to be triggered on issue_updated events, then set them to be triggered at the affected issue
      4. Add a comment at the affected issue

      Expected Results

      Jira will query the database once to build the JSON from the issue to be sent through WebHooks.

      Actual Results

      Jira will query the database twice for each WebHook that was triggered, increasing the response time from Jira.

      Workaround

      TBD

      Attachments

        Issue Links

          Activity

            People

              5b2ccddb8927 Anna Przybycień
              rrosa@atlassian.com Rodrigo Rosa
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: