Single event notification is being yielded every time with wait_for_external_event
#507
Labels
P1
Priority 1
wait_for_external_event
#507
🐛 Describe the bug
When an event notification is raised for an orchestrator that is not yet waiting, then using
wait_for_external_event
multiple times will always yield that same specific initial event.A typical scenario when this might happen is when multiple event notifications are raised at the same time by other orchestrators and the main orchestrator would not be waiting during handling of the first event.
🤔 Expected behavior
The expected behavior is that a single event notification only yields a single
wait_for_external_event
. This does work as expected for event notifications that were submitted after an orchestrator already started to wait for the external event, but not for notification events that were scheduled before waiting for the external event.☕ Steps to reproduce
I have been able to reproduce the issue in a small example as seen below.
Sample repository: https://github.com/arjendev/durable-functions-python-external-events-issue-sample
Sample orchestration history: https://github.com/arjendev/durable-functions-python-external-events-issue-sample/blob/main/OrchestrationHistory.csv
The expected behavior of execution of the orchestrator would be:
my-durable-event
However, on step 4, the
wait_for_external_event
keeps returning the initial event and thus the while loop runs forever with the eventual error:Orchestrator function 'hello_orchestrator' failed: maximum recursion depth exceeded in comparison
.The text was updated successfully, but these errors were encountered: