workflow-core
workflow-core copied to clipboard
PersistedWorkflow ExecutionPointers exponentially increase in workflow loop.
Describe the bug Workflows that loop over steps double the number of ExecutionPointers with each loop. This is causing exponential slowdown with each iteration. This seems to be stemming from the filter loop in the Execute method in the the WorkflowExecutor that filters out inactive pointers Execute method.
To Reproduce Create a workflow that loops over the same steps. With each successive iteration check the ExecutionPointers count and time it takes to complete the loop.
Expected behavior Looping behavior should not be increasing the execution time of a workflow
Additional context With only the active pointers being used, is it necessary to persist the inactive pointers? To alleviate the problem these changes were made to the EntityFrameworkPersistenceProvider in our forked repo. With these changes each iteration is being performed at a consistent time and no unintended effects have been observed (yet).
I also encountered this problem,My current solution is use a middleware to clean WorkflowExecutor. No impact on existing business after cleaning
seems to e a duplicate of #1028