guozhangwang commented on code in PR #12439: URL: https://github.com/apache/kafka/pull/12439#discussion_r930512882
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java: ########## @@ -480,6 +503,21 @@ private void closeAndRecycleTasks(final Map<Task, Set<TopicPartition>> tasksToRe } } + private void convertActiveToStandby(final StreamTask activeTask, + final Set<TopicPartition> partitions) { + activeTask.recycleAndConvert(); + activeTaskCreator.closeAndRemoveTaskProducerIfNeeded(activeTask.id()); + final StandbyTask standbyTask = standbyTaskCreator.createStandbyTaskFromActive(activeTask, partitions); + tasks.replaceActiveWithStandby(standbyTask); + } + + private void convertStandbyToActive(final StandbyTask standbyTask, + final Set<TopicPartition> partitions) { + standbyTask.recycleAndConvert(); Review Comment: I will update the `TaskManagerTest` for them, since the creator classes do not have their own test suites. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org