Details
-
Bug
-
Resolution: Workaround exists
-
Neutral
-
None
-
None
-
None
Description
Reproduce
- Create 80+ tasks
- Highlight them all in the task list and click abort.
- You will see that Magnolia gets stuck and the system just hangs.
- If you reset your instance, you will see that the tasks have then been moved to the “all tasks” tab.
- If you then try to archive these tasks at the same time, the same thing will happen. Magnolia just hangs.
- 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.
Checklists
Acceptance criteria