-
Notifications
You must be signed in to change notification settings - Fork 801
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
Update generating close event to use event version #4261
Conversation
return taskGenerator.GenerateWorkflowCloseTasks( | ||
now, | ||
closeEvent, |
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.
it's possible that the closeEvent returned is nil even when error is nil right? then it will cause a NPE in taskGenerator?
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.
Will return error when close event is nil
) (*types.HistoryEvent, error) { | ||
|
||
if e.GetExecutionInfo().CloseStatus == persistence.WorkflowCloseStatusNone { | ||
return nil, nil |
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.
not sure if it's better to return an error here. Usually caller will assume historyEvent is not nil when error is nil?
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.
Will return error when close event is nil
What changed?
Update generating close event to use event version
Why?
The task refresher may generate a task with newer version and gets ignored later
How did you test it?
Unit tests.
Potential risks
If there is bugs with this change, there could be race condition in handling closed event
Release notes
Documentation Changes