diff --git a/service/history/task/transfer_active_task_executor.go b/service/history/task/transfer_active_task_executor.go index 42c57dffc80..ea00a25e2e0 100644 --- a/service/history/task/transfer_active_task_executor.go +++ b/service/history/task/transfer_active_task_executor.go @@ -584,11 +584,11 @@ func (t *transferActiveTaskExecutor) processCancelExecution( targetDomainName, requestCancelInfo.CancelRequestID, ); err != nil { - t.logger.Debug(fmt.Sprintf("Failed to cancel external workflow execution. Error: %v", err)) + t.logger.Info(fmt.Sprintf("Failed to cancel external workflow execution. Error: %v", err)) // Check to see if the error is non-transient, in which case add RequestCancelFailed // event and complete transfer task by setting the err = nil - if common.IsServiceTransientError(err) || common.IsContextTimeoutError(err) || err == errTargetDomainNotActive { + if common.IsServiceTransientError(err) || common.IsContextTimeoutError(err) { // for retryable error just return return err } @@ -694,11 +694,11 @@ func (t *transferActiveTaskExecutor) processSignalExecution( targetDomainName, signalInfo, ); err != nil { - t.logger.Debug(fmt.Sprintf("Failed to signal external workflow execution. Error: %v", err)) + t.logger.Info(fmt.Sprintf("Failed to signal external workflow execution. Error: %v", err)) // Check to see if the error is non-transient, in which case add SignalFailed // event and complete transfer task by setting the err = nil - if common.IsServiceTransientError(err) || common.IsContextTimeoutError(err) || err == errTargetDomainNotActive { + if common.IsServiceTransientError(err) || common.IsContextTimeoutError(err) { // for retryable error just return return err } diff --git a/service/history/task/transfer_active_task_executor_test.go b/service/history/task/transfer_active_task_executor_test.go index e604ac0ce38..6bf30ed9bb7 100644 --- a/service/history/task/transfer_active_task_executor_test.go +++ b/service/history/task/transfer_active_task_executor_test.go @@ -974,26 +974,6 @@ func (s *transferActiveTaskExecutorSuite) TestProcessCancelExecution_CrossCluste ) } -func (s *transferActiveTaskExecutorSuite) TestProcessCancelExecution_TargetNotActive() { - s.testProcessCancelExecutionWithError( - s.targetDomainID, - func( - mutableState execution.MutableState, - workflowExecution, targetExecution types.WorkflowExecution, - event *types.HistoryEvent, - transferTask Task, - requestCancelInfo *persistence.RequestCancelInfo, - ) { - persistenceMutableState, err := test.CreatePersistenceMutableState(mutableState, event.ID, event.Version) - s.NoError(err) - s.mockExecutionMgr.On("GetWorkflowExecution", mock.Anything, mock.Anything).Return(&persistence.GetWorkflowExecutionResponse{State: persistenceMutableState}, nil) - cancelRequest := createTestRequestCancelWorkflowExecutionRequest(s.targetDomainName, transferTask.GetInfo().(*persistence.TransferTaskInfo), requestCancelInfo.CancelRequestID) - s.mockHistoryClient.EXPECT().RequestCancelWorkflowExecution(gomock.Any(), cancelRequest).Return(&types.DomainNotActiveError{}).Times(1) - }, - errTargetDomainNotActive, - ) -} - func (s *transferActiveTaskExecutorSuite) testProcessCancelExecution( targetDomainID string, setupMockFn func( @@ -1106,26 +1086,6 @@ func (s *transferActiveTaskExecutorSuite) TestProcessSignalExecution_Failure() { ) } -func (s *transferActiveTaskExecutorSuite) TestProcessSignalExecution_TargetNotActive() { - s.testProcessSignalExecutionWithError( - s.targetDomainID, - func( - mutableState execution.MutableState, - workflowExecution, targetExecution types.WorkflowExecution, - event *types.HistoryEvent, - transferTask Task, - signalInfo *persistence.SignalInfo, - ) { - persistenceMutableState, err := test.CreatePersistenceMutableState(mutableState, event.ID, event.Version) - s.NoError(err) - s.mockExecutionMgr.On("GetWorkflowExecution", mock.Anything, mock.Anything).Return(&persistence.GetWorkflowExecutionResponse{State: persistenceMutableState}, nil) - signalRequest := createTestSignalWorkflowExecutionRequest(s.targetDomainName, transferTask.GetInfo().(*persistence.TransferTaskInfo), signalInfo) - s.mockHistoryClient.EXPECT().SignalWorkflowExecution(gomock.Any(), signalRequest).Return(&types.DomainNotActiveError{}).Times(1) - }, - errTargetDomainNotActive, - ) -} - func (s *transferActiveTaskExecutorSuite) TestProcessSignalExecution_Duplication() { s.testProcessSignalExecution( s.targetDomainID,