[GitHub] [kafka] ableegoldman commented on a change in pull request #11405: KAFKA-12648: Wrap all exceptions thrown to handler as StreamsException & add TaskId field

2021-10-19 Thread GitBox


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



##
File path: 
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java
##
@@ -2203,7 +2203,7 @@ public void shouldInitTaskTimeoutAndEventuallyThrow() {
 task.maybeInitTaskTimeoutOrThrow(Duration.ofMinutes(5).toMillis(), 
null);
 
 assertThrows(
-TimeoutException.class,
+StreamsException.class,

Review comment:
   Good point -- done (also did for `StandbyTaskTest`)




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




[GitHub] [kafka] ableegoldman commented on a change in pull request #11405: KAFKA-12648: Wrap all exceptions thrown to handler as StreamsException & add TaskId field

2021-10-20 Thread GitBox


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



##
File path: 
streams/src/main/java/org/apache/kafka/streams/errors/StreamsException.java
##
@@ -25,15 +28,45 @@
 
 private final static long serialVersionUID = 1L;
 
+private TaskId taskId = null;
+
 public StreamsException(final String message) {
 super(message);
 }
 
+public StreamsException(final String message, final TaskId taskId) {
+this(message);
+this.taskId = taskId;
+}

Review comment:
   Done, thanks!




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




[GitHub] [kafka] ableegoldman commented on a change in pull request #11405: KAFKA-12648: Wrap all exceptions thrown to handler as StreamsException & add TaskId field

2021-10-20 Thread GitBox


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 
activeTasks, final Collection

[GitHub] [kafka] ableegoldman commented on a change in pull request #11405: KAFKA-12648: Wrap all exceptions thrown to handler as StreamsException & add TaskId field

2021-10-20 Thread GitBox


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



##
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##
@@ -636,6 +636,10 @@ boolean runLoop() {
 failedStreamThreadSensor.record();
 this.streamsUncaughtExceptionHandler.accept(e);
 return false;
+} catch (final StreamsException e) {

Review comment:
   Ah, good catch (tbh I kind of feel we shouldn't pass it to the handler 
at all and just shut down the application, but that's a discussion for another 
time/place)




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