Start lot of workflows from another one #4470
Replies: 3 comments 2 replies
-
Is it a distributed file system ? So every worker can access to the same files. |
Beta Was this translation helpful? Give feedback.
-
Assuming the file system is not local..otherwise I don’t think multiple workflow can access to the same files. General idea is good but you need to make it deterministic. Each file should only start exactly one workflow. Cadence provides ID uniqueness support so that any retry will not starting same workflows again. More specifically, you can use a single activity to load all the file names and then use the file names as workflow ID to start COMP workflows. |
Beta Was this translation helpful? Give feedback.
-
@ZalinoSoft Can you post the full exception for "java.lang.RuntimeException: Failure processing decision task"? The wrapped exception might have details. |
Beta Was this translation helpful? Give feedback.
-
Hi, guys! I have a workflow and its goal is at a specific time to read a set of files and perform some operations with each of them sequentially. Everything works as expected except the fact that the entire amount of time spent on completing the workflow (compute files) is too much. So, I thought to compute the files in parallel in order to reduce the total amount of time spent. To achieve this, I set up a workflow (TRIG) that at a specific time just read the name of the files and for each name it starts a new computation workflow (COMP) sending the file name as parameter. With 10 files is OK since TRIG starts only 10 COMP workflows. However, when trying with 200 files after starting the last COMP workflow, the TRIG workflow throws "java.lang.RuntimeException: Failure processing decision task" and it re-starts itself and creates again 200 other COMP workflows... and so on... I don't know how to solve this and I thought to ask here: is there anything wrong in starting hundreds of workflows from another one? Should I configure something special in cadence or worflows (pooler, etcs)?Should I change my design to achieve the parallelism in other way? Any suggestion?
Beta Was this translation helpful? Give feedback.
All reactions