jnh5y commented on code in PR #12161:
URL: https://github.com/apache/kafka/pull/12161#discussion_r887290368


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java:
##########
@@ -479,6 +485,26 @@ public void restore(final Map<TaskId, Task> tasks) {
         }
     }
 
+    private void updateStandbyPartitions(final Map<TaskId, Task> tasks,
+        final Set<TopicPartition> restoringChangelogs) {
+        // For standby tasks in the `tasks` map, we make sure that the 
`restoreConsumer`'s state
+        // is correct.
+        if (state == ChangelogReaderState.STANDBY_UPDATING) {
+            for (final TopicPartition partition : restoringChangelogs) {
+                final ProcessorStateManager manager = 
changelogs.get(partition).stateManager;
+                final TaskId taskId = manager.taskId();
+                final Task task = tasks.get(taskId);
+                if (manager.taskType() == TaskType.STANDBY) {
+                    if (task != null) {
+                        
restoreConsumer.resume(Collections.singleton(partition));
+                    } else {
+                        
restoreConsumer.pause(Collections.singleton(partition));
+                    }

Review Comment:
   Done in 
https://github.com/apache/kafka/pull/12161/commits/cb6d6f132a91c3373cbb6556d0b00b1d2bf8eb1b.
 



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