You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/08/30 04:56:26 UTC

[GitHub] [kafka] vamossagar12 commented on a change in pull request #11076: KAFKA-12486: Enforce Rebalance when a TaskCorruptedException is throw…

vamossagar12 commented on a change in pull request #11076:
URL: https://github.com/apache/kafka/pull/11076#discussion_r698176806



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -590,7 +590,14 @@ boolean runLoop() {
                 log.warn("Detected the states of tasks " + e.corruptedTasks() + " are corrupted. " +
                          "Will close the task as dirty and re-create and bootstrap from scratch.", e);
                 try {
+                    // check if any active task got corrupted. We will trigger a rebalance in that case.
+                    // once the task corruptions have been handled
+                    Set<Task> corruptedActiveTasks = taskManager.anyActiveTasksCorrupted(e.corruptedTasks());
                     taskManager.handleCorruption(e.corruptedTasks());
+                    if (!corruptedActiveTasks.isEmpty()) {

Review comment:
       done




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org