You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a potential race condition in this sample. If two instances of HttpStartSingle execute concurrently, both function calls will report success, but only one orchestration instance will actually start. Depending on your requirements, this may have undesirable side effects.
My testing shows that in case of race condition (i.e. starter.StartNewAsync is called two times with the same instanceId) I'm getting InvalidOperationException with Message = "An Orchestration instance with the status Running already exists".
That means that only one function call will report success while the other one will throw exception and report HTTP 500 code.
Is there a mistake in the docs or did I misunderstand something? Thank you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
this page
https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-singletons?tabs=csharp
says that
My testing shows that in case of race condition (i.e. starter.StartNewAsync is called two times with the same instanceId) I'm getting InvalidOperationException with Message = "An Orchestration instance with the status Running already exists".
That means that only one function call will report success while the other one will throw exception and report HTTP 500 code.
Is there a mistake in the docs or did I misunderstand something? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions