Skip to content

Commit

Permalink
check if workflow is closed when processing sticky timeout timer (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminc authored Dec 12, 2017
1 parent 9314ff5 commit c844eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/history/timerQueueProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,8 @@ Update_History_Loop:
t.metricsClient.IncCounter(metrics.TimerTaskDecisionTimeoutScope, metrics.ScheduleToStartTimeoutCounter)
// decision schedule to start timeout only apply to sticky decision
// check if scheduled decision still pending and not started yet
if isPending && di.Attempt == task.ScheduleAttempt && di.StartedID == emptyEventID &&
msBuilder.isStickyTaskListEnabled() {
if isPending && di.Attempt == task.ScheduleAttempt && msBuilder.isWorkflowExecutionRunning() &&
di.StartedID == emptyEventID && msBuilder.isStickyTaskListEnabled() {
timeoutEvent := msBuilder.AddDecisionTaskScheduleToStartTimeoutEvent(scheduleID)
if timeoutEvent == nil {
// Unable to add DecisionTaskTimedout event to history
Expand Down

0 comments on commit c844eb7

Please sign in to comment.