-
Bug
-
Resolution: Fixed
-
Medium
-
6.3.4, 6.4.3, 6.6.2, 6.8.2, 6.13.7
-
23
-
Severity 1 - Critical
-
31
-
To resolve this issue you will need to enable the faster permissions service in your site.
Summary
The task report macro can execute long running SQL queries and take a lot of memory if the macro is added with the default parameters. It happens because the plugin loads all active tasks to memory.
Example SQL query:
select distinct t."GLOBAL_ID" , t."CONTENT_ID", case when cu.lower_display_name is null then 0 else 1 end CU_LOWER_DISPLAY_NAME, cu.lower_display_name, t."CREATE_DATE" from "AO_BAF3AA_AOINLINE_TASK" t join CONTENT c on t."CONTENT_ID" = c.CONTENTID join SPACES s on c.SPACEID = s.SPACEID left join user_mapping um on t."ASSIGNEE_USER_KEY" = um.user_key left join cwd_user cu on um.lower_username = cu.lower_user_name WHERE s.SPACESTATUS <> 'ARCHIVED' AND c.CONTENT_STATUS <> 'deleted' AND t."TASK_STATUS" = 'UNCHECKED' ORDER BY CU_LOWER_DISPLAY_NAME DESC, cu.lower_display_name ASC, t."CREATE_DATE" DESC
Cause
Two issues:
- DB issue: we scan all records from AO_BAF3AA_AOINLINE_TASK (tasks), CONTENT, cwd_user, user_mapping tables, filter them and join them. It is an expensive operation.
- JVM issue: for example, if we have 100K active tasks, DB will return a dataset with 100K records. It requires allocating a lot of objects and will require a lot of GC work later.
How to reproduce
- Have a lot of active tasks
- Create a page and add a task report macro with default parameters
Workaround
Workaround 1 Remove task reports with "show ALL tasks" settings.
To find all pages that use this macro, follow these steps:
- Navigate to Confluence Administration > Macro Usage
- Under Confluence Inline Tasks, the macro tasks-report-macro will be listed, it will show how many pages the macro is on alongside
- Click tasks-report-macro to view a list of pages containing the macro
Workaround 2 Disable the macro
- Navigate to Confluence Administration > Manage Add-ons
- Search for "task" with the All add-ons filter applied
- Under Confluence Inline Tasks expand the + 51 of 51 modules expander
- Find Task report (tasks-report) in the list, and click Disable
- is related to
-
CONFSERVER-59572 Task report macro uses "username" fields to join tables (instead of lower_username)
- Closed
- relates to
-
CONFSERVER-79865 When Faster permission enabled, TASK Report macro containing page has performance issue and fails to load
- Closed
-
PSR-161 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...