Uploaded image for project: 'Task Management'
  1. Task Management
  2. TASKMGMT-53

Bulk Actions for Tasks Cause StackOverflow Errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Workaround exists
    • Neutral
    • None
    • None
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jnodarse Julian Nodarse
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD