guozhangwang commented on code in PR #12439: URL: https://github.com/apache/kafka/pull/12439#discussion_r930246317
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java: ########## @@ -377,7 +390,17 @@ public void handleAssignment(final Map<TaskId, Set<TopicPartition>> activeTasks, throw first.getValue(); } - tasks.createTasks(activeTasksToCreate, standbyTasksToCreate); + createNewTasks(activeTasksToCreate, standbyTasksToCreate); + } + + private void createNewTasks(final Map<TaskId, Set<TopicPartition>> activeTasksToCreate, + final Map<TaskId, Set<TopicPartition>> standbyTasksToCreate) { + final Collection<Task> newActiveTasks = activeTasksToCreate.isEmpty() ? + Collections.emptySet() : activeTaskCreator.createTasks(mainConsumer, activeTasksToCreate); + final Collection<Task> newStandbyTask = standbyTasksToCreate.isEmpty() ? + Collections.emptySet() : standbyTaskCreator.createTasks(standbyTasksToCreate); Review Comment: Yeah you got me :) this is mainly for unit tests laziness since for many cases we would not need to create active/standby tasks, but still need to mock a no-op function. -- 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