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

Increase max value of duplications_index id column

    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

      When an instance contains too much data the cross-project duplication index can reach maximum id value. That lead to the following error on MySql:

      org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.
      BatchUpdateException: Duplicate entry '2147483647' for key 'PRIMARY'
      Caused by: java.sql.BatchUpdateException: Duplicate entry '2147483647' for key 'PRIMARY'
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2147483647' for key 'PRIMARY'
      

      2147483647 is the maximum value for an INT column. The column type should be changed to BIGINT (see as an example migration 434).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.lancelot Julien Lancelot
              Reporter:
              henryju OLD - Julien HENRY
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: