-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
-
Empty show more show less
-
Basel 28
-
3
Customer reports that *freshly created tasks are not always stored into the correct folder*s. While it seems that task should be added into month and day directories in JCR, that sometimes does not seem to happen. As a result, the customer ends up with too many nodes in a single folder, causing performance problems.
Please research this and provide a fix for it, if necessary.
UPDATE
The issue seems to be caused by the following:
info.magnolia.task.persistence.TasksStoreImpl is a singleton which is injected with TaskPathGenerator. The latter initialises
private AtomicLong atomicLong = new AtomicLong(System.currentTimeMillis());
Each time a new task is persisted (created as new or updated) the following happens at
info.magnolia.task.persistence.TasksStoreImpl.persist(Task)
String taskNodeName = String.valueOf(taskPathGenerator.incrementAndGet()); String parentPath = taskPathGenerator.getParentPath(taskNodeName);
So, the parent path (e.g. /tasks/2015/11/2) is obtained by incrementing a counter which started at some point in time in the past, i.e. when TaskPathGenerator was instantiated and not necessarily reflects the current date.
- is duplicated by
-
MGNLUI-3936 Newly created messages are not be stored in proper date folder
- Accepted