guozhangwang commented on code in PR #12439: URL: https://github.com/apache/kafka/pull/12439#discussion_r932683401
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java: ########## @@ -480,6 +507,19 @@ private void closeAndRecycleTasks(final Map<Task, Set<TopicPartition>> tasksToRe } } + private void convertActiveToStandby(final StreamTask activeTask, + final Set<TopicPartition> partitions) { + final StandbyTask standbyTask = standbyTaskCreator.createStandbyTaskFromActive(activeTask, partitions); + activeTaskCreator.closeAndRemoveTaskProducerIfNeeded(activeTask.id()); Review Comment: We want to have a single place for managing producers for EOS-v1 and EOS-v2, since for v2 we do not have a per-task producer anyways, we decided to put both client-producers and task-producers here. When we remove the deprecated task-producers, we can consider moving the client-producers into the thread. -- 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