ableegoldman commented on a change in pull request #11405:
URL: https://github.com/apache/kafka/pull/11405#discussion_r732511036



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java
##########
@@ -900,9 +903,13 @@ void closeAndCleanUpTasks(final Collection<Task> 
activeTasks, final Collection<T
             } catch (final TaskMigratedException e) {
                 // just ignore the exception as it doesn't matter during 
shutdown
                 tasksToCloseDirty.add(task);
-            } catch (final RuntimeException e) {
+            } catch (final StreamsException e) {
+                e.setTaskId(task.id());
                 firstException.compareAndSet(null, e);
                 tasksToCloseDirty.add(task);
+            } catch (final RuntimeException e) {
+                firstException.compareAndSet(null, new StreamsException(e, 
task.id()));
+                tasksToCloseDirty.add(task);

Review comment:
       Almost, the `try` branch with no exceptions actually adds it to the 
`tasksToCloseClean` set. Subtle but important difference 🙂 




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