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

When Faster permission enabled, TASK Report macro containing page has performance issue and fails to load

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      7.12.3 - 7.15.x

      1. Enable Faster Permissions via dark feature

      7.16.0 - 7.19.1

      1. Enable Faster Permissions via Admin interface

      7.19.2+

      1. Enable Faster Permissions via Admin interface
      2. Enable confluence.denormalisedpermissions-in-task-report-macro dark feature

      Then (all versions):

      • Create a page with 2 different Task Report Macros (one for Open task, another for Closed task)
        Sample Storage Format
        <p>Open Task</p>
        <ac:structured-macro ac:name="tasks-report-macro" ac:schema-version="1" ac:macro-id="1e3ef9c6-6cbf-44af-8c24-fe82043c0a2b" />
        
        <p>Closed Task</p>
        <ac:structured-macro ac:name="tasks-report-macro" ac:schema-version="1" ac:macro-id="fab73191-50d7-429b-98a2-b628a8c1fd34">
        <ac:parameter ac:name="status">complete</ac:parameter>
        </ac:structured-macro>
        

      Database table `AO_BAF3AA_AOINLINE_TASK` need to have many records to replicate this issue

      Expected Results

      The page load successfully and task report displayed

      Actual Results

      Every time when the page is loaded, one of the SQL Queries is executed to obtain the closed tasks that takes a very long time due to inefficient SQL

      The page keeps loading and finally timeout. On thread dumps, we see long-running HTTP threads like this trying to load the page and waiting for the database:

      Runnable
      Java Stack
      at sun.nio.ch.FileDispatcherImpl.read0(java.base@11.0.14/Native Method)
      at sun.nio.ch.SocketDispatcher.read(java.base@11.0.14/SocketDispatcher.java:39) 
      ...
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822) 
      ...
      at com.sun.proxy.$Proxy2056.findWithSQL(Unknown Source) 
      at com.atlassian.confluence.plugins.tasklist.ao.dao.AOInlineTasksWithFastPermissionsDao.findWithSQL(AOInlineTasksWithFastPermissionsDao.java:681) 
      ...
      at com.atlassian.confluence.plugins.tasklist.ao.dao.AOInlineTasksWithFastPermissionsDao.searchTaskViaFastPermissions(AOInlineTasksWithFastPermissionsDao.java:241) 
      at com.atlassian.confluence.plugins.tasklist.service.DefaultInlineTaskService.searchTasksWithFastPermissions(DefaultInlineTaskService.java:389) 
      at com.atlassian.confluence.plugins.tasklist.service.DefaultInlineTaskService.searchTasks(DefaultInlineTaskService.java:333)
      ... 
      at com.atlassian.confluence.plugins.tasklist.macro.TasksReportMacro.execute(TasksReportMacro.java:124) 
      
      

      Workaround

      Workaround 1 Remove task reports with "show ALL tasks" settings.

      To find all pages that use this macro, follow these steps:

      1. Navigate to Confluence Administration > Macro Usage
      2. Under Confluence Inline Tasks, the macro tasks-report-macro will be listed, it will show how many pages the macro is on alongside
      3. Click tasks-report-macro to view a list of pages containing the macro

      Workaround 2 Disable the macro

      1. Navigate to Confluence Administration > Manage Add-ons
      2. Search for "task" with the All add-ons filter applied
      3. Under Confluence Inline Tasks expand the + 51 of 51 modules expander
      4. Find Task report (tasks-report) in the list, and click Disable

              glipatov George Lipatov
              5339cdd01cf4 Jeffery Xie
              Votes:
              19 Vote for this issue
              Watchers:
              35 Start watching this issue

                Created:
                Updated:
                Resolved: