Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-301

Stop caching Global Settings in SQ Web Server

    XMLWordPrintable

    Details

    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:

      Description

      Current state

      The web server loads global settings at startup and keeps them in cache. Cache is updated on the flow in memory as properties are changed in UI through web service calls.

      The problem

      The cache is not compatible with clustering of web servers. Web server must be stateless.
      Note that the MMF is not about Compute Engine, which reloads settings each time a task is processed, nor scanners.

      What we want to do

      Being stateless requires to drop the cache of settings in web server. Properties must be loaded from database each time they are needed by a web server component.

      The configuration stored in the file config/sonar.properties is about the system environment specific to the web server node (file system like path to temp dir, HTTP listening port, DB connection, JVM options, ...). This configuration does not contain properties shared within the cluster nodes. It can be kept in memory by web server. Any change requires a restart.

      The options are:

      1. execute one SQL request per property requested by a web server component and cache result until the end of the HTTP request
        • may cause many SQL requests per HTTP request, potentially many times the same properties and very likely with an impact on performance. The overhead has to be estimated.
      2. execute a single SQL request for all properties and cache the result until the end of the HTTP request.
        • we may retrieve many useless properties and this one request may be slow because of number of rows and/or size of data
        • the ratio of used/loaded properties may be very small
        • this could be mitigated if scanner and CE properties are ignored

      All options require to have fast database round-trips. It implies to replace the type of column PROPERTIES.TEXT_VALUE from CLOB to VARCHAR. A consequence is to stop supporting property values which size is greater than 4'000 characters. The views.xml data of the Governance plugin must be stored elsewhere.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christophe.levis Christophe Levis
              Reporter:
              sebastien.lesaint Sebastien Lesaint
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: