Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenquan Xing committed Apr 17, 2018
1 parent a33303d commit c834a97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions service/history/historyEngineInterfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ type (
}
)

var (
standbyTaskRetryError = newTaskRetryError()
)

// newTaskRetryError create a error which indicate the task should be retry
func newTaskRetryError() *taskRetryError {
return &taskRetryError{}
Expand Down
1 change: 0 additions & 1 deletion service/history/timerQueueAckMgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ func (t *timerQueueAckMgrImpl) readTimerTasks() ([]*persistence.TimerTaskInfo, *
t.isReadFinished = true
}

// fillin the retry task
filteredTasks := []*persistence.TimerTaskInfo{}

// since we have already checked that the clusterName is a valid key of clusterReadLevel
Expand Down
8 changes: 4 additions & 4 deletions service/history/timerQueueStandbyProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (t *timerQueueStandbyProcessorImpl) processExpiredUserTimer(timerTask *pers
//
// we do not need to notity new timer to base, since if there is no new event being replicated
// checking again if the timer can be completed is meaningless
return newTaskRetryError()
return standbyTaskRetryError
}
// since the user timer are already sorted, so if there is one timer which will not expired
// all user timer after this timer will not expired
Expand Down Expand Up @@ -237,7 +237,7 @@ func (t *timerQueueStandbyProcessorImpl) processActivityTimeout(timerTask *persi
//
// we do not need to notity new timer to base, since if there is no new event being replicated
// checking again if the timer can be completed is meaningless
return newTaskRetryError()
return standbyTaskRetryError
}
// since the activity timer are already sorted, so if there is one timer which will not expired
// all activity timer after this timer will not expired
Expand All @@ -262,7 +262,7 @@ func (t *timerQueueStandbyProcessorImpl) processDecisionTimeout(timerTask *persi
//
// we do not need to notity new timer to base, since if there is no new event being replicated
// checking again if the timer can be completed is meaningless
return newTaskRetryError()
return standbyTaskRetryError
}
return nil
})
Expand All @@ -276,7 +276,7 @@ func (t *timerQueueStandbyProcessorImpl) processWorkflowTimeout(timerTask *persi
return t.processTimer(timerTask, func(msBuilder *mutableStateBuilder) error {
// we do not need to notity new timer to base, since if there is no new event being replicated
// checking again if the timer can be completed is meaningless
return newTaskRetryError()
return standbyTaskRetryError
})
}

Expand Down

0 comments on commit c834a97

Please sign in to comment.