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

Make update of tree of Components in table PROJECTS transactional

    Details

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

      Description

      Updates to the tree of components in table PROJECTS should not be visible to the users and the UI unless the flag islast on the snapshot has been switched to true.

      This applicative transaction management will be implemented with B_* columns and relies on the strong assumption that there can't be more than one analysis of given project under processing at any point in time.

      • new columns:
        • B_CHANGED (boolean)
        • B_COPY_COMPONENT_UUID (varchar 50)
        • B_DESCRIPTION (varchar 2000)
        • B_ENABLED (boolean)
        • B_LANGUAGE (varchar 20)
        • B_LONG_NAME (varchar 500)
        • B_MODULE_UUID (varchar 50)
        • B_MODULE_UUID_PATH (varchar 1500)
        • B_NAME (varchar 500)
        • B_PATH (varchar 2000)
        • B_QUALIFIER (varchar 3)
        • note that some varchar columns have a smaller size than their associated "A" column. This is because MySQL can't have more than 65k bytes of VARCHAR in a row. Anyway, it is sane to reduce sizes. "A" columns sizes will be changed in a dedicated ticket.
      • any operation must populate all these columns
        • insert: B_CHANGED=true, B_NAME=(new value), B_LONG_NAME=(newValue), B_DESCRIPTION=(newValue), B_ENABLED=true
        • update: B_CHANGED=true, B_NAME=(NAME or new value), B_LONG_NAME=(LONG_NAME or newValue), B_DESCRIPTION=(DESCRIPTION or newValue), B_ENABLED=true
        • delete: B_CHANGED=true, B_NAME=NAME, B_LONG_NAME=LONG_NAME, B_DESCRIPTION=DESCRIPTION, B_ENABLED=false
      • a single mass update must be added to the transaction which switches snapshots in the CE
        UPDATE
                  NAME=B_NAME, LONG_NAME=B_LONG_NAME, DESCRIPTION=B_DESCRIPTION, ENABLED=B_ENABLED,
                  B_CHANGED=false
        where
                 ROOT_UUID=(project uuid)
        AND B_CHANGED=true;
        

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: