[TASKMGMT-53] Bulk Actions for Tasks Cause StackOverflow Errors Created: 25/Jan/21  Updated: 23/Jul/21  Resolved: 27/May/21

Status: Closed
Project: Task Management
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Julian Nodarse Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Reproduce

  1. Create 80+ tasks 
  2. Highlight them all in the task list and click abort. 
  3. You will see that Magnolia gets stuck and the system just hangs.
  4. If you reset your instance, you will see that the tasks have then been moved to the “all tasks” tab. 
  5. If you then try to archive these tasks at the same time, the same thing will happen. Magnolia just hangs. 
  6. Once you reset it for a 2nd time, then all tasks are gone. You then have all these notifications in your notifications list with StackOverflowError messages. 

Expected
Archiving or Aborting tasks in bulk successfully executes.

Actual
 Archiving or aborting tasks in bulk cause Magnolia to hang and then requires a restart. 

Workaround
See https://wiki.magnolia-cms.com/display/SERVICES/Tasks+Cleaner
or
Use a groovy script with the TasksManager class to remove or archive large amounts of tasks.

import info.magnolia.jcr.util.NodeUtil
import info.magnolia.task.Task
import java.text.SimpleDateFormat
archived= 0
taskManager = info.magnolia.objectfactory.Components.getComponent(info.magnolia.task.TasksManager.class);
session = ctx.getJCRSession("tasks")
qm = session.getWorkspace().getQueryManager()
query="select * from [mgnl:task] where status = '"+Task.Status.class.getName()+":Resolved'"
q = qm.createQuery(query, "JCR-SQL2")
results = q.execute()
tasks = NodeUtil.asList(NodeUtil.asIterable(results.getNodes()))
for (task in tasks) {
    ++archived
    String id = task.getId()
    taskManager.archiveTask(id);
}
println("archived "+archived+" tasks")

Notes

  • You can reproduce this on the demo. I tested this using 80 and 90 tasks.
  • This does not seem to be an issue with Notifications. I was able to delete 90 notifications at the same time without any problems.

Generated at Mon Feb 12 11:02:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.