1996fanrui commented on code in PR #20151:
URL: https://github.com/apache/flink/pull/20151#discussion_r1049831635


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriteRequestDispatcherImpl.java:
##########
@@ -152,14 +200,23 @@ private void failAndClearWriter(Throwable e) {
         writer = null;
     }
 
+    private void failAndClearWriter(
+            JobID jobID, JobVertexID jobVertexID, int subtaskIndex, Throwable 
throwable) {
+        if (writer == null) {
+            return;
+        }
+        writer.fail(jobID, jobVertexID, subtaskIndex, throwable);
+        writer = null;
+    }

Review Comment:
   >  One is failing the pendingResult the other is not? 🤔
   
   No, all of them will fail all `pendingResults`. I will add some comments for 
the method.
   
   ```
       /**
        * The throwable is just used for special subtask, other subtasks should 
fail by
        * {@link CHANNEL_STATE_SHARED_STREAM_EXCEPTION}
        */
       public void fail(JobVertexID jobVertexID, int subtaskIndex, Throwable 
throwable) {
   ```



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