From 8f53c29e1fbd24b540294ae5131323d669eb2efe Mon Sep 17 00:00:00 2001 From: ShahabT Date: Tue, 26 Nov 2024 14:40:59 -0800 Subject: [PATCH] task -> wft --- .../history/workflow/workflow_task_state_machine.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/service/history/workflow/workflow_task_state_machine.go b/service/history/workflow/workflow_task_state_machine.go index 2c1192dcc6e..e0d2bdeb880 100644 --- a/service/history/workflow/workflow_task_state_machine.go +++ b/service/history/workflow/workflow_task_state_machine.go @@ -1081,8 +1081,8 @@ func (m *workflowTaskStateMachine) afterAddWorkflowTaskCompletedEvent( m.ms.executionInfo.LastCompletedWorkflowTaskStartedEventId = attrs.GetStartedEventId() m.ms.executionInfo.MostRecentWorkerVersionStamp = attrs.GetWorkerVersion() - taskDeployment := attrs.GetDeployment() - taskBehavior := attrs.GetVersioningBehavior() + wftDeployment := attrs.GetDeployment() + wftBehavior := attrs.GetVersioningBehavior() versioningInfo := m.ms.GetExecutionInfo().GetVersioningInfo() var completedTransition bool @@ -1090,7 +1090,7 @@ func (m *workflowTaskStateMachine) afterAddWorkflowTaskCompletedEvent( // It's possible that the completed WFT is not yet from the current transition because when // the transition started, the current wft was already started. In this case, we allow the // started wft to run and when completed, we create another wft immediately. - if versioningInfo.DeploymentTransition.GetDeployment().Equal(taskDeployment) { + if versioningInfo.DeploymentTransition.GetDeployment().Equal(wftDeployment) { versioningInfo.DeploymentTransition = nil completedTransition = true } @@ -1111,13 +1111,13 @@ func (m *workflowTaskStateMachine) afterAddWorkflowTaskCompletedEvent( wfBehaviorBefore := m.ms.GetEffectiveVersioningBehavior() // Change deployment and behavior based on the completed wft. - if wfBehaviorBefore != taskBehavior || !wfDeploymentBefore.Equal(taskDeployment) { + if wfBehaviorBefore != wftBehavior || !wfDeploymentBefore.Equal(wftDeployment) { if versioningInfo == nil { versioningInfo = &workflowpb.WorkflowExecutionVersioningInfo{} m.ms.GetExecutionInfo().VersioningInfo = versioningInfo } - versioningInfo.Behavior = taskBehavior - versioningInfo.Deployment = taskDeployment + versioningInfo.Behavior = wftBehavior + versioningInfo.Deployment = wftDeployment } // Deployment and behavior after applying the data came from the completed wft.