Open bentsherman opened 1 year ago
For now I think the only way to work around this bug is to avoid using reduction operators in a recursive workflow. To do that, you would have to combine some processes so that the reduction happens in a process script instead of the dataflow logic. In the above example, I would have to refactor the flatMap | count
piece into a single process that performs the same thing in Groovy or e.g. a Bash script. The downside is that you may lose some parallelization.
I found this issue with operator collect. Any suggestion to work around this bug for collect()? Thank you
Hi @asangphukieo , see my previous comment , for now the only workaround I can see is to avoid using collect
and try to implement the same logic with Groovy or Bash code. You might have to merge some processes to make it work.
I think I'm encountering this right now with recursive subworkflow I'm trying to write that uses groupTuple
, I suppose that qualifies as a reduction operator as well..
Indeed
I think the problem is that the operator is re-used across every iteration of the workflow, so if it needs to wait for all inputs before emitting then it will never proceed past the first iteration.
Basically we need a way to "reset" the operator on each iteration. What we really need to do is create a new instance of the operator in the DAG for each iteration, but that requires modifying the DAG while it is running which is a whole can of worms...
Bug report
If a workflow uses any kind of reduction operator (collect, count, max, reduce, etc), it will hang forever if recursed.
Steps to reproduce the problem
Here is a minimal example that recurses a workflow that uses the count operator. You could also use any operator that returns a value channel, and I predict you would get the same result.
Program output
Log output (abridged):
Environment
Additional context
I suspect it's the same or similar bug as #2609