cadonna commented on code in PR #19507: URL: https://github.com/apache/kafka/pull/19507#discussion_r2063474629
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java: ########## @@ -552,8 +552,14 @@ private void handleTasksWithStateUpdater(final Map<TaskId, Set<TopicPartition>> private void handleTasksPendingInitialization() { // All tasks pending initialization are not part of the usual bookkeeping + + final Set<Task> tasksToCloseDirty = new HashSet<>(); + for (final Task task : tasks.drainPendingTasksToInit()) { - closeTaskClean(task, Collections.emptySet(), Collections.emptyMap()); + closeTaskClean(task, tasksToCloseDirty, new HashMap<>()); + } + for (final Task task : tasksToCloseDirty) { + closeTaskDirty(task, false); Review Comment: You should pass `false`. With the state updater newly created or revived tasks are not added to the task registry immediately but only when they are ready for running. -- 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