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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -272,15 +302,19 @@ private void maybeCompleteRestoration(final StreamTask 
task,
             if (restoredChangelogs.containsAll(taskChangelogPartitions)) {
                 task.completeRestoration(offsetResetter);
                 log.debug("Stateful active task " + task.id() + " completed 
restoration");
-                addTaskToRestoredTasks(task);
+                addToRestoredTasks(task);
                 updatingTasks.remove(task.id());
-                if (onlyStandbyTasksLeft()) {
-                    changelogReader.transitToUpdateStandby();
-                }
+                transitToUpdateStandbysIfOnlyStandbysLeft();
             }
         }
 
-        private void addTaskToRestoredTasks(final StreamTask task) {
+        private void transitToUpdateStandbysIfOnlyStandbysLeft() {
+            if (onlyStandbyTasksLeft()) {
+                changelogReader.transitToUpdateStandby();
+            }
+        }

Review Comment:
   We missed to switch to updating standby tasks when all active tasks are 
removed or they failed.



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