cadonna commented on code in PR #14508:
URL: https://github.com/apache/kafka/pull/14508#discussion_r1351723672


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -223,10 +223,7 @@ boolean handleCorruption(final Set<TaskId> corruptedTasks) 
{
             final Collection<Task> tasksToCommit = allTasks()
                 .values()
                 .stream()
-                // TODO: once we remove state restoration from the stream 
thread, we can also remove
-                //  the RESTORING state here, since there will not be any 
restoring tasks managed
-                //  by the stream thread anymore.
-                .filter(t -> t.state() == Task.State.RUNNING || t.state() == 
Task.State.RESTORING)
+                .filter(t -> t.state() == Task.State.RUNNING)

Review Comment:
   Since restoring active tasks return false from `commitNeeded()` because they 
have never processed records and have never execute a punctuation, 
`preCommit()` and `postCommit()` are [never called on restoring active task in 
this specific 
code](https://github.com/apache/kafka/blob/c32d2338a7e0079e539b74eb16f0095380a1ce85/streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskExecutor.java#L141).
 This is true for enabled and disabled state updater.
   Additionally, as far as I know there is nothing to flush in a restoring 
active task, because restoration uses the state restore callback.



-- 
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

Reply via email to