From f80999ed73176abe83d45b6a519eebe5269ae2ce Mon Sep 17 00:00:00 2001 From: wenquan xing Date: Mon, 24 Jul 2023 16:23:18 -0700 Subject: [PATCH 1/3] Do not return task disgarded error if namespace is no longer valid locally --- service/history/timer_queue_standby_task_executor.go | 2 +- service/history/transfer_queue_standby_task_executor.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/history/timer_queue_standby_task_executor.go b/service/history/timer_queue_standby_task_executor.go index 647db8dbf4e..e0583cb389a 100644 --- a/service/history/timer_queue_standby_task_executor.go +++ b/service/history/timer_queue_standby_task_executor.go @@ -441,7 +441,7 @@ func (t *timerQueueStandbyTaskExecutor) processTimer( } if !nsRecord.IsOnCluster(t.clusterName) { // discard standby tasks - return consts.ErrTaskDiscarded + return nil } executionContext, release, err := getWorkflowExecutionContextForTask(ctx, t.cache, timerTask) diff --git a/service/history/transfer_queue_standby_task_executor.go b/service/history/transfer_queue_standby_task_executor.go index 94b8ac0896a..e2fdf54b895 100644 --- a/service/history/transfer_queue_standby_task_executor.go +++ b/service/history/transfer_queue_standby_task_executor.go @@ -509,7 +509,7 @@ func (t *transferQueueStandbyTaskExecutor) processTransfer( } if !nsRecord.IsOnCluster(t.clusterName) { // discard standby tasks - return consts.ErrTaskDiscarded + return nil } weContext, release, err := getWorkflowExecutionContextForTask(ctx, t.cache, taskInfo) From 1c059c01a53329c6b2eb4938bbe209b0285b843a Mon Sep 17 00:00:00 2001 From: wxing1292 Date: Tue, 25 Jul 2023 10:31:26 -0700 Subject: [PATCH 2/3] Update timer_queue_standby_task_executor.go --- service/history/timer_queue_standby_task_executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/history/timer_queue_standby_task_executor.go b/service/history/timer_queue_standby_task_executor.go index e0583cb389a..82a8f949888 100644 --- a/service/history/timer_queue_standby_task_executor.go +++ b/service/history/timer_queue_standby_task_executor.go @@ -440,7 +440,7 @@ func (t *timerQueueStandbyTaskExecutor) processTimer( return err } if !nsRecord.IsOnCluster(t.clusterName) { - // discard standby tasks + // namespace is not replicated to local cluster, ignore corresponding tasks return nil } From c50ac949cde54e18f04e93ef3023de93b4328803 Mon Sep 17 00:00:00 2001 From: wxing1292 Date: Tue, 25 Jul 2023 10:31:58 -0700 Subject: [PATCH 3/3] Update transfer_queue_standby_task_executor.go --- service/history/transfer_queue_standby_task_executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/history/transfer_queue_standby_task_executor.go b/service/history/transfer_queue_standby_task_executor.go index e2fdf54b895..77ee9a7176f 100644 --- a/service/history/transfer_queue_standby_task_executor.go +++ b/service/history/transfer_queue_standby_task_executor.go @@ -508,7 +508,7 @@ func (t *transferQueueStandbyTaskExecutor) processTransfer( return err } if !nsRecord.IsOnCluster(t.clusterName) { - // discard standby tasks + // namespace is not replicated to local cluster, ignore corresponding tasks return nil }