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

      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

            [CONFSERVER-79865] When Faster permission enabled, TASK Report macro containing page has performance issue and fails to load

            Is this ported back to 8.5 LTS?

             

            Chelo Moreira added a comment - Is this ported back to 8.5 LTS?  

            A fix for this issue is available in Confluence Data Center 8.7.1.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Data Center 8.7.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi All,

            We identified a potential issue with this change during testing, as a result we have removed it from the pending Confluence 8.6.0 release.

            We're continuing work on the ticket to get it resolved. We'll update the ticket with a new release target when we have more to share.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, We identified a potential issue with this change during testing, as a result we have removed it from the pending Confluence 8.6.0 release. We're continuing work on the ticket to get it resolved. We'll update the ticket with a new release target when we have more to share. Thanks, James Ponting Engineering Manager - Confluence Data Center

            Sake added a comment -

            Please backport this to 8.5!

            Sake added a comment - Please backport this to 8.5!

            also hoping for an update, as we cannot enable the task report macro on our platform because of this issue

            Matthias Krauss added a comment - also hoping for an update, as we cannot enable the task report macro on our platform because of this issue

            Is there any update to report on this item? 
            Thanks for the swift feedback.

            Rody Hulleman added a comment - Is there any update to report on this item?  Thanks for the swift feedback.

            eli.cohen added a comment - - edited

            @George Lipatov any updates from your side ?

            eli.cohen added a comment - - edited @George Lipatov any updates from your side ?

            Ticket CONFSERVDEV-24337 is to revert the use of fast permission for task report macro by add an extra system property (which is disabled by default) before new solution is applied.

            Jeffery Xie added a comment - Ticket CONFSERVDEV-24337 is to revert the use of fast permission for task report macro by add an extra system property (which is disabled by default) before new solution is applied.

            The fix in CONFSERVER-55449 is not entirely fix the performance issue when fast permission is enabled. New solution is required to improve the performance 

            Jeffery Xie added a comment - The fix in CONFSERVER-55449 is not entirely fix the performance issue when fast permission is enabled. New solution is required to improve the performance 

              glipatov George Lipatov
              5339cdd01cf4 Jeffery Xie
              Affected customers:
              19 This affects my team
              Watchers:
              35 Start watching this issue

                Created:
                Updated:
                Resolved: