diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 9fbd2a61143..3f4d62aae02 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -3744,8 +3744,6 @@ func (e *MutableStateImpl) CloseTransactionAsMutation( } } - setTaskInfo(e.GetCurrentVersion(), now, e.InsertTasks) - // update last update time e.executionInfo.LastUpdateTime = &now e.executionInfo.StateTransitionCount += 1 @@ -3830,8 +3828,6 @@ func (e *MutableStateImpl) CloseTransactionAsSnapshot( } } - setTaskInfo(e.GetCurrentVersion(), now, e.InsertTasks) - // update last update time e.executionInfo.LastUpdateTime = &now e.executionInfo.StateTransitionCount += 1 diff --git a/service/history/workflow/mutable_state_util.go b/service/history/workflow/mutable_state_util.go index b02166999aa..44c66e58914 100644 --- a/service/history/workflow/mutable_state_util.go +++ b/service/history/workflow/mutable_state_util.go @@ -55,27 +55,3 @@ func convertSyncActivityInfos( } return outputs } - -// TODO: can we deprecate this method and -// let task generator correctly set task version and -// visibility timestamp? -func setTaskInfo( - version int64, - timestamp time.Time, - insertTasks map[tasks.Category][]tasks.Task, -) { - // set the task version, - // as well as the Timestamp if not scheduled task - for category, tasksByCategory := range insertTasks { - if category == tasks.CategoryReplication { - continue - } - - for _, task := range tasksByCategory { - task.SetVersion(version) - if category.Type() == tasks.CategoryTypeImmediate { - task.SetVisibilityTime(timestamp) - } - } - } -}