-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activity functions are scheduled multiple times in fan-out mode #485
Comments
Thanks @danieltskv. |
Just a friendly ping here, @hossam-nasr |
Just checking to see if there is any progress? Thanks! |
Thanks for the fix. Any idea when a new release will be available with the changes? |
Hi @danieltskv I'm planning on releasing a new version of the Durable SDK today, so it should be available later today :) |
Hi @danieltskv versions of Durable Functions SDK with the fix are out now! v2.x - https://github.com/Azure/azure-functions-durable-js/releases/tag/v2.1.3 |
Seems that the issues is still reproducable, #574 |
Describe the bug
Follow up to: #477
I would like an orchestrator function to schedule multiple activity functions for parallel processing (fan-out) where it's valid for some to fail (throw an error), as I will only use the results from the ones that succeeded.
context.df.Task.all
throws as soon as one task fails, and there is no equivalent to the JSPromise.allSettled()
.I tried using the proposed solution from @GP4cK and @davidmrdavid found here: #477 (comment)
The issue I'm noticing is that some activity functions that eventually succeed are being called multiple times. I was assuming the later loop that iterates over the tasks simply continues or fetches the result.
It seems that after the error is thrown and the replay happens on the orchestrator function, activity functions that were scheduled after the failed one (
success_2
andsuccess_3
in the code example) are ran again.Investigative information
[3.*, 4.0.0)
2.1.1
TypeScript 4.9.5
16.19.0
Visual Studio Code
To Reproduce
Expected behavior
Activity functions that were scheduled with
context.df.Task.all
should not be called (scheduled) again when later iterating over them withyield task
.Actual behavior
Activity functions are called again.
Sample output
Notice that
success_2
andsuccess_3
are called twice. A second time after the error is thrown and we're iterating over the tasks.The text was updated successfully, but these errors were encountered: