cadonna commented on code in PR #12439: URL: https://github.com/apache/kafka/pull/12439#discussion_r931465179
########## 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 guess your reply here is for the wrong comment. 🙂 Maybe this should be the reply for https://github.com/apache/kafka/pull/12439#discussion_r930074311. There is `ActiveTaskCreatorTest` but for inexplicable reasons there is no `StanbyTaskCreatorTest`. Could you please create that and add the test there? Sorry for nagging here but I think we should really be strict with unit tests to ensure that future refactorings do not break the behavior without any warnings. In fact the absence of some unit tests for the code before your refactoring makes me feel a bit uncomfortable reviewing this. -- 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