Skip to content

Commit

Permalink
Do not drop workflow task if it failed due to unhandled events (#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminc committed Apr 14, 2022
1 parent 6409090 commit ea27233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/history/workflowTaskHandlerCallbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func (handler *workflowTaskHandlerCallbacksImpl) handleWorkflowTaskCompleted(
tag.WorkflowID(token.GetWorkflowId()),
tag.WorkflowRunID(token.GetRunId()),
tag.WorkflowNamespaceID(namespaceID.String()))
if currentWorkflowTask.Attempt > 1 {
if currentWorkflowTask.Attempt > 1 && wtFailedCause.failedCause != enumspb.WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND {
// drop this workflow task if it keeps failing. This will cause the workflow task to timeout and get retried after timeout.
return nil, serviceerror.NewInvalidArgument(wtFailedCause.Message())
}
Expand Down

0 comments on commit ea27233

Please sign in to comment.