From 1f1a8df065f614d51a9cbf5279f20037eeabbf02 Mon Sep 17 00:00:00 2001 From: Yichao Yang Date: Mon, 19 Sep 2022 21:53:16 -0700 Subject: [PATCH] Fix task reschedule policy --- service/history/queues/executable.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/history/queues/executable.go b/service/history/queues/executable.go index 87de61a736f..381cc211084 100644 --- a/service/history/queues/executable.go +++ b/service/history/queues/executable.go @@ -82,7 +82,7 @@ var ( // across multiple submissions to scheduler reschedulePolicy = common.CreateTaskReschedulePolicy() taskNotReadyReschedulePolicy = common.CreateTaskNotReadyReschedulePolicy() - taskResourceExhuastedReschedulePolicy = common.CreateTaskNotReadyReschedulePolicy() + taskResourceExhuastedReschedulePolicy = common.CreateTaskResourceExhaustedReschedulePolicy() ) const ( @@ -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)