guozhangwang commented on code in PR #12439: URL: https://github.com/apache/kafka/pull/12439#discussion_r930178451
########## 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(); Review Comment: For standby tasks this is good; for active tasks my intention is to call `closeAndRemoveTaskProducerIfNeeded` right after the task is already in `closed` state, before the new standby task is created. Thinking about it a bit, maybe I can defer that after the new standby task is created already. That may feel a bit awkward but practically is still correct. -- 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