-
Notifications
You must be signed in to change notification settings - Fork 904
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
[Reset] Handle completion events from restarted children #7295
base: main
Are you sure you want to change the base?
Conversation
return nil, consts.ErrChildExecutionNotFound | ||
} | ||
initiatedAttr := initiatedEvent.GetStartChildWorkflowExecutionInitiatedEventAttributes() | ||
childID := fmt.Sprintf("%s:%s", initiatedAttr.GetWorkflowType().Name, initiatedAttr.GetWorkflowId()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we really should create a util function for this concatenation logic. I think I've seen it in 3 different places.
childrenInitializedAfterResetPoint := mutableState.GetChildrenInitializedPostResetPoint() | ||
if len(childrenInitializedAfterResetPoint) > 0 { | ||
// This parent was reset and it also has some children that potentially were restarted. | ||
initiatedEvent, err := mutableState.GetChildExecutionInitiatedEvent(ctx, parentInitiatedID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I don't think we need to load the initiatedEvent. Both child workflow type and child workflowID are available in ChildExecutionInfo in mutable state I think.
} | ||
// The results are from the child that this parent initiated. We should stop tracking the child and process the result now. | ||
delete(childrenInitializedAfterResetPoint, childID) | ||
mutableState.SetChildrenInitializedPostResetPoint(childrenInitializedAfterResetPoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz update ms.approximateSize
when setting the reset point.
What changed?
In this PR we are doing 2 things,
ChildrenInitializedPostResetPoint
Why?
How did you test it?
Added unit tests + manual testing.
Potential risks
N/A
Documentation
Pending
Is hotfix candidate?
No