-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
6.2.11
Currently messages are organized in the messages workspace by username. So each username has an entry in the workspace. Under the username node there can be several message nodes all organized at the same level (see messages.png attached). This creates a performance problem when a user accumulates too many messages under a single username node.
This issue is similar to one we had with tasks (see TASKMGMT-22).
Workaround
Use a script
import info.magnolia.context.MgnlContext; import javax.jcr.Session; import javax.jcr.Node; import javax.jcr.NodeIterator; def removeMessages(username) { try { Session session = MgnlContext.getJCRSession("messages"); path = "/" + username; Node usertree = session.getNode(path); NodeIterator childrenIterator = usertree.getNodes(); while (childrenIterator.hasNext()) { Node node = childrenIterator.nextNode(); path = node.getPath(); println "about to remove ${path} item"; session.removeItem(path); } session.save(); println "messages of ${username} removed"; } catch (Exception e) { println e; } } //example of usage removeMessages("superuser");
Acceptance criteria
- duplicates
-
TASKMGMT-22 Newly created tasks may not be stored in proper date folder
- Closed