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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -127,11 +141,20 @@ private void restoreTasks() throws InterruptedException {
             final Set<TopicPartition> completedChangelogs = 
changelogReader.completedChangelogs();
             final List<Task> activeTasks = 
updatingTasks.values().stream().filter(Task::isActive).collect(Collectors.toList());
             for (final Task task : activeTasks) {
-                endRestorationIfChangelogsCompletelyRead(task, 
completedChangelogs);
+                maybeCompleteRestoration((StreamTask) task, 
completedChangelogs);
             }
         }
 
+        private void handleRuntimeException(final RuntimeException 
runtimeException) {
+            log.error("An unexpected error occurred within the state updater 
thread: " + runtimeException);
+            final ExceptionAndTasks exceptionAndTasks = new 
ExceptionAndTasks(new HashSet<>(updatingTasks.values()), runtimeException);
+            updatingTasks.clear();
+            failedTasks.add(exceptionAndTasks);
+            isRunning.set(false);
+        }
+

Review Comment:
   Just refactoring.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to