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

Improve performance when searching for activated rules

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6
    • Component/s: ElasticSearch, Rules
    • Labels:

      Description

      When searching for activated rules (from UI or WS), one ES query per rule is executed :

      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2204' on index 'rules' on type 'activeRule' | time=1ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S1161' on index 'rules' on type 'activeRule' | time=1ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2111' on index 'rules' on type 'activeRule' | time=1ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2885' on index 'rules' on type 'activeRule' | time=2ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2975' on index 'rules' on type 'activeRule' | time=1ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2157' on index 'rules' on type 'activeRule' | time=2ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2200' on index 'rules' on type 'activeRule' | time=1ms
      2016.03.01 11:15:48 TRACE web[es] ES get request for key 'java-sonar-way-96460:squid:S2167' on index 'rules' on type 'activeRule' | time=1ms
      

      This can happen when searching for rules activated on a profile (/api/rules/search?activaction=true), or by searching for all activated rules (/api/rules/search?f=actives).

      Technical details :
      In order to fix this, the field "parent" from the list of active rules (in "actives" list) will be removed as it's never used.

        Attachments

          Activity

            People

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

              Dates

              Due:
              Created:
              Updated:
              Resolved: