Fix non-deterministic error when resetting a parent workflow with a child workflow #1557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
Fix non-deterministic error when resetting a parent workflow with a child workflow
Why?
After migrating from Cadence to Temporal, resetting a parent workflow containing a child workflow results in the following error
This is because replaying the workflow history in the new run, decision task uses the new run_id to generate the child workflow id in this format <run_id>_<history_id>. Because run_id is different, when trying to look up that child workflow command, there is no match.
Incorporating the following change from Cadence fixes this issue: uber-go/cadence-client#1118
Checklist
Closes Unable to reset workflow with completed childworkflow whose child workflowID is generated by SDK #723
How was this tested:
unit tests manual tests