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

Prevent provisioning multiple projects with the same key on MySQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2
    • Component/s: Database
    • Labels:
      None

      Description

      On MySQL, If multiple users provision the same project key in the same time, it's possible to create multiple projects with the same key.
      In 5.2, PROJECTS.KEE is unique, but not on MySQL.

      To prevent inserting multiple projects with the same key, here's what we should do :

      • Insert the new project with the given key
      • In another transaction, select projects with this key (order by their ids), and remove them all expect the first one

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.lancelot Julien Lancelot
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: