Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-9028 Web service api/projects/delete is too slow
  3. SONAR-9334

Delete events only for the project when deleting a project

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5-M1
    • Component/s: Activity, Database
    • Labels:

      Description

      When deleting a project, currently, deletion of events is performed for every components in the project (same for views). As a consequence, multiple SQL requests are sent to delete data from permission tables(one for every 1000 components in the project).

      The fact is that events can only be defined for a given analysis and an analysis only relates to a project (or view). The number of SQL request could be therefor reduced to just one, a very much simpler one.

      To avoid having data left over in the database with this new method which would have been deleted by the old one, database migrations should be added:

      • make column EVENTS.COMPONENT_UUID not nullable and populate it with the UUID of the project of the analysis
      • fix any incorrect value in EVENTS.COMPONENT_UUID (to the UUID of the project of the event's analysis)

        Attachments

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            sebastien.lesaint Sebastien Lesaint
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: