Open yycptt opened 2 years ago
Server stores a workflow's original runID (in workflow start event) which won't change during reset. So one potential solution is generate child workflow ID based on this original runID.
But this solution may conflict with some future work related to reset. @yiminc Would you mind provide some insights here? Thanks.
I hit this in #1385. I'm curious if there's any risk in using the OriginalRunId by default in the meantime.
Expected Behavior
When reseting a workflow with no pending child execution. (Reset with pending child currently is not supported.) After reset, parent workflow should continue execution without any error
Actual Behavior
After reset, parent workflow will encounter a non-deterministic error during replay. The error happens when processing the child workflow init event and can't find the corresponding child workflow command/state machine.
The root cause is we use child workflow ID to find the corresponding command. However if child workflowID is not specified in child option, SDK will automatically generate one based on the workflow's runID. After reset, the workflow's runID changes but in workflow history the child workflow ID is still based on the original runID. Hence the not found and non-deterministic error.
Steps to Reproduce the Problem
Specifications