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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -960,7 +1011,7 @@ private void removeRevokedTasksFromStateUpdater(final 
Set<TopicPartition> remain
             for (final Task restoringTask : stateUpdater.getTasks()) {
                 if (restoringTask.isActive()) {
                     if 
(remainingRevokedPartitions.containsAll(restoringTask.inputPartitions())) {
-                        tasks.addPendingTaskToCloseClean(restoringTask.id());
+                        
tasks.addPendingActiveTaskToSuspend(restoringTask.id());

Review Comment:
   A revoked active tasks could be immediately reassigned (i.e. in the very 
next assignment) as an active task or a standby task to the stream thread. If 
we closed the revoked active task, we would need to re-create the reassigned 
active or standby task. If we suspend the revoked active task, we can resume it 
if it is immediately reassigned as an active task and we can recycle it if it 
is immediately reassigned as a standby task.   



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