Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55523

DefaultGlobalDescriptionDao query full scans the content table

XMLWordPrintable

      Every time Confluence page is opened, we fetch Global Description from cache/db. Responsible class for this is DefaultGlobalDescriptionDao.

      1. First time after server start the value should be fetched by the following query to DB 

      select * from CONTENT where contenttype = 'GLOBALDESCRIPTION';
      

      2. On MySQL this query fullscans content table because there is no proper index for this. To verify if you're affected by this bug - please SQL query outlined in the above step and check its execution time. By right, this query should only take mere milliseconds to be completed
      3. If the instance was restarted in busy time, many threads will stuck on full scanning the content table, which will negatively impact DB performance.

      All this can lead to the Confluence outage. The root cause for this is extremely inefficient way of storing Global Description value in DB. We definitely should not fullscan our biggest table just to retrieve single global value.

       

              glipatov George Lipatov
              epyshnograev Efim (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: