Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11401

Performance hotspot when changing state of issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 9.3
    • Component/s: Issues, Scalability
    • Labels:
    • Edition:
      Community
    • Production Notes:
      None

      Description

      The web API api/issues/do_transition is too slow. It's 1.5 second long on SonarCloud on the sonarqube project. (EDIT: Up to 45s on Peach)

      The hotspot is this SQL request, which takes 980ms:

      jdbc execute: select i.issue_type as ruleType, i.severity as severity, i.resolution as resolution, i.status as status, sum(i.effort) as effort, count(i.issue_type) as "count", (i.issue_creation_date >= ?) as inLeak
          from issues i
          inner join projects p on p.uuid = i.component_uuid and p.project_uuid = i.project_uuid
          where i.status !='CLOSED'
          and i.project_uuid = ?
          and (p.uuid_path like ? escape '/' or p.uuid = ?)
          group by i.issue_type, i.severity, i.resolution, i.status, inLeak [9223372036854775807, 'AWabEZXnRZfoIOWdQnDG', '.AWabEZXnRZfoIOWdQnDG.%', 'AWabEZXnRZfoIOWdQnDG'] => 30 rows
      

      Query stats confirms longer SQL request (5 calls for 1.39s)

      select i.issue_type as ruleType, i.severity as severity, i.resolution as resolution, i.status as status, sum(i.effort) as effort, count(i.issue_type) as "count", (i.issue_creation_date >= ?) as inLeak
          from issues i
          inner join projects p on p.uuid = i.component_uuid and p.project_uuid = i.project_uuid
          where i.status !='CLOSED'
          and i.project_uuid = ?
          and (p.uuid_path like ? escape '/' or p.uuid = ?)
          group by i.issue_type, i.severity, i.resolution, i.status, inLeak
      

      Rest of SQL or ES calls is marginal.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: