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

Index on PROJECTS.UUID column is not unique

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.7, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9.1
    • Fix Version/s: 8.0
    • Component/s: Database
    • Labels:
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Since column PROJECTS.UUID was added in 6.0 by SONAR-7738 it has a non unique index called PROJECTS_UUIDS on all SGDBs but H2.

      Unfortunately, the index is correct on H2 and should be unique as the code has been assuming it is since forever.

      The cause of this situation is probably to find in the usage of Ruby at the time and the fact database used to unit test DB changes was not initialized with Ruby by with a static script.

      The static script was correctly defining a unique index but the Ruby DB migration wasn't.

      Luckily, SQ code is consistent enough that it apparently never inserted two rows with the same UUID in table PROJECTS and/or we never tried and retrieve those rows.
       

       

        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: