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

Deletion & purge of projects and stale branches purge is too slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.9, 8.4
    • Fix Version/s: 8.5
    • Component/s: Database, Issues
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      When a SonarQube instance contains a lot of issues, deleting a project from the UI can be slow and requires a lot of CPU.

      The CE DB purge step and the deletion of projects from UI trigger full scans of issue_changes. That leads to high pressure on DB and to the inability to process the Compute Engine queue.

      One option would be to:

      • add the column issue_changes.project_uuid so that the purge SQL request can be filtered and stop full scanning the table.

      Another one, specific to PostgresSQL : 

      • add a foreign key from issue_changes.issue_key to issues.kee so that the PostgreSQL feature "on delete cascade" can be implemented on issues.

      Another idea:

      • Store issue_changes as json inside the issues table, and drop the issue_changes table.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pierre.guillot Pierre Guillot
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: