-
Notifications
You must be signed in to change notification settings - Fork 273
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
"Non-Deterministic" error which I have high confidence to believe cause by host rather than my code. #2563
Comments
@jviau: are you aware of any non-determinism errors that may be caused by a failed cancellation flow? |
Could it be related to this? microsoft/durabletask-dotnet#158 |
I am experiencing the similar issue with a Python based durable function (containerized) |
@jviau I don't think so, because our function does not have any custom middleware when this problem happens. public Task Invoke(FunctionContext context, FunctionExecutionDelegate next)
{
if (!IsOrchestrationTrigger(context))
{
return next(context);
}
this.logger.LogInformation("Orchestration start executing function: {functionId}, invocation: {invocationId}", context.FunctionId, context.InvocationId);
return next(context);
}
private static bool IsOrchestrationTrigger(FunctionContext context)
{
return context.FunctionDefinition.InputBindings.Values.Any(x => x.Type == "orchestrationTrigger");
} |
I have exactly the same error message:
|
Description
(dotnet-isolated)
Hi all, my orchestrator is getting "Non-Deterministic" errors which I believe isn't cause by my code.
The "Non-Deterministic" error message I got looks like this:
"Non-Deterministic workflow detected: A previous execution of this orchestration scheduled an activity task with sequence ID 0 and name 'xxxxx' (version ''), but the current replay execution hasn't (yet?) scheduled this task. Was a change made to the orchestrator code after this instance had already started running?"
As you can see the sequence ID is "0", which means it is the first activity that got orchestrated, but my orchestrator looks like following:
The first line of code my orchestrator was call the first activity, so there isn't any change my orchestrator didn't schedule a task with sequence ID "0". And I can guarantee that I didn't do a deploy, so the code didn't change.
And if you wonder, we didn't have any custom worker middleware for now, so no await operation inside user code middleware.
Additional information
Before, our orchestration never got "Non-Deterministic" error when we use in proc dotnet function, but just after we move to dotnet-isolated worker, it starts reporting this error.
And some nature of our durable functions: the main activity of our function uses a lot of named pipes, therefore the function host will cancel the JobHost a lot due to health monitor alert on named pipe number. And according to the log from our side we see the JobHost was just under cancellation when this orchestration was running, and we got "Unable to cancel invocation xxx" log showing something wrong with the cancellation.
Expected behavior
My orchestrator shouldn't report "Non-Deterministic" error. At least, not on ID with "0".
Actual behavior
"Non-Deterministic"
Relevant source code snippets
see above.
Known workarounds
Hope you can provide one for me.
App Details
Screenshots
If you need any, tell me.
If deployed to Azure
The latest one:
Other old ones:
"createdTime": "2023-08-19T10:17:17Z"
"lastUpdatedTime": "2023-08-19T23:52:17Z"
"instanceId": "0079d620afca5ef3a531007facad5c12"
"createdTime": "2023-08-13T10:20:31Z"
"lastUpdatedTime": "2023-08-15T11:13:28Z"
"instanceId": "5e0251be87eb597c84a6d957f49c2e28"
The text was updated successfully, but these errors were encountered: