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


##########
streams/src/main/java/org/apache/kafka/streams/errors/StreamsException.java:
##########
@@ -57,19 +73,29 @@ public StreamsException(final Throwable throwable) {
 
     public StreamsException(final Throwable throwable, final TaskId taskId) {
         super(throwable);
-        this.taskId = taskId;
+        this.taskIds.add(taskId);
     }
 
     /**
      * @return  the {@link TaskId} that this exception originated from, or 
{@link Optional#empty()} if the exception
      *          cannot be traced back to a particular task. Note that the 
{@code TaskId} being empty does not
      *          guarantee that the exception wasn't directly related to a 
specific task.
      */
+    @Deprecated
     public Optional<TaskId> taskId() {
-        return Optional.ofNullable(taskId);
+        return taskIds.isEmpty() ? Optional.empty() : Optional.of(new 
ArrayList<>(taskIds).get(0));
+    }
+
+    public Set<TaskId> taskIds() {

Review Comment:
   See above.



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