Poor performance while raising/lowering task steps for many processes #6177
-
As we try to automate a lot of steps in our Kitodo workflow it is often necessary to raise or lower the step for remaining manual checks. Of course we want to advance all processes at once. Advancing 1177 processes takes roughly 3 minutes (this is reproducible after several tests) By mere multiplication, advancing 4800 processes should not take more than 15 minutes. But it takes 7200 min or 2 hours. Naturally, we would actually like to advance a lot more processes than that at once. But know it seems we are forced to break it down to tiny bits and repeat the action of selecting and advancing again and again. The only alternative we could find so far was to use a Kitodo script to advance the processes. This takes less than 10 minutes for 10,000 processes but we need to regenerate the index, which takes between 30 to 45 minutes again. We have looked at existing issues like #5131 but the indexing doesn't seem to be as slow as described during reindexing but the poor performance primarily occurs when raising/lowering task steps. Changing ElasticSearch's refresh_interval to -1 or 10min did not solve the issue. How do you all raise your steps in a timely manner? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
In SLUB we are getting issues while setting up or down set task state, see #5813. So we reset only 10 processes at once down until we reached the needed workflow task. Setting task state up is not our daily use as it could trigger other issues with our automatic tasks (starting them twice or three times then only once). We did not need to set the task state of so many tasks up (or down) as this is done by the application itself. We have a lot of automatic tasks which in most cases execute a script which is exiting with state -1 so the task itself remain open and the task then will be closed after the work is done by using the ActiveMQ queue mechanism to close a task. |
Beta Was this translation helpful? Give feedback.
-
Through further tests we have been able to link this issue to hierarchical processes. As it seems, a bunch of processes without a parent process can be pushed forward and backward much easier than processes that do have a parent processes. But leaving the processes without a parent makes it much harder and error prone to select all of them at once in order to move them forward. |
Beta Was this translation helpful? Give feedback.
I suppose those changes are not helping here as they are only related to the display of parent processes. I suspect we have different issues here. I looked at the code, and one thing that caught my attention is that when we close a task, we always call
closeParent
.kitodo-production/Kitodo/src/main/java/org/kitodo/production/services/workflow/WorkflowControllerService.java
Lines 477 to 486 in e68fd3c