-
Notifications
You must be signed in to change notification settings - Fork 781
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
Check workflow task after reapply events #2840
Conversation
|
||
// After reapply event, checking if we should schedule a workflow task | ||
// Do not create workflow task when the workflow is cron and the cron has not been started yet | ||
if msBuilder.GetExecutionInfo().CronSchedule != "" && !msBuilder.HasProcessedOrPendingWorkflowTask() { |
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.
instead of checking for cronSchedule, you should check firstWorkflowTaskBackoff
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.
If cron has the first wf task, then we should continue schedule a task. Is this correct?
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.
We also need to take care of workflow retry backoff case I think.
service/history/historyEngine.go
Outdated
// Do not create workflow task when the workflow has first workflow task backoff and execution is not started yet | ||
workflowTaskBackoff := timestamp.TimeValue(executionInfo.GetExecutionTime()).After(timestamp.TimeValue(executionInfo.GetStartTime())) | ||
if workflowTaskBackoff && !mutableState.HasProcessedOrPendingWorkflowTask() { |
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.
Shall we create a util function for this check?
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.
👍 this is also needed here
temporal/service/history/historyEngine.go
Line 1804 in 87c3beb
workflowTaskBackoff := timestamp.TimeValue(executionInfo.GetExecutionTime()).After(timestamp.TimeValue(executionInfo.GetStartTime())) |
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 do
* Check workflow task after reapply events
* Check workflow task after reapply events
* Check workflow task after reapply events
What changed?
Check workflow task after reapply events
Why?
When reapply event to current branch, we need to check if it should schedule a new workflow task
How did you test it?
Potential risks
Is hotfix candidate?