Skip to content

Commit

Permalink
Fix task reschedule policy (#3413)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored and dnr committed Sep 29, 2022
1 parent 0603535 commit ac2593c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/history/queues/executable.go
Expand Up @@ -82,7 +82,7 @@ var (
// across multiple submissions to scheduler
reschedulePolicy = common.CreateTaskReschedulePolicy()
taskNotReadyReschedulePolicy = common.CreateTaskNotReadyReschedulePolicy()
taskResourceExhuastedReschedulePolicy = common.CreateTaskNotReadyReschedulePolicy()
taskResourceExhuastedReschedulePolicy = common.CreateTaskResourceExhaustedReschedulePolicy()
)

const (
Expand Down Expand Up @@ -455,7 +455,7 @@ func (e *executableImpl) rescheduleTime(
// using a different reschedule policy to slow down retry
// as the error means mutable state is not ready to handle the task,
// need to wait for replication.
e.timeSource.Now().Add(taskNotReadyReschedulePolicy.ComputeNextDelay(0, attempt))
return e.timeSource.Now().Add(taskNotReadyReschedulePolicy.ComputeNextDelay(0, attempt))
}

backoff := reschedulePolicy.ComputeNextDelay(0, attempt)
Expand Down

0 comments on commit ac2593c

Please sign in to comment.