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

Bulk apply of permission templates should not be restricted to 1'000 projects

    XMLWordPrintable

    Details

    • Edition:
      Community

      Description

      Bulk applying permission templates is restricted to 1'000 projects because of a limitation in the SQL request to load projects (see ComponentDao#selectByQuery() with list of components).
      This restriction should be removed.

      One of the three solutions could be used, they should be tested to see which one is better performance-wise.

      1. Break the list into sub lists of 1000 items max and make a request for each sub list

      2. The 1000 limitation applies to a single IN statement. So multiple IN statement can be combine with OR conditions:

      WHERE v IN (1, 2, ..., 1000)
          OR IN(1001, 1002, ..., 2000)
          OR ...
      

      3. Limitation applies only to single values, not to tuple. So a constant value could be added to create tuples and therefore not be limited to 1000 values:

      WHERE (1, v) IN ((1, val1), (1, val2), (1, val3), ...)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: