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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinator.java:
##########
@@ -195,9 +195,19 @@ void announceCombinedWatermark() {
                 "Distributing maxAllowedWatermark={} to subTaskIds={}",
                 maxAllowedWatermark,
                 subTaskIds);
-        for (Integer subtaskId : subTaskIds) {
-            context.sendEventToSourceOperator(
-                    subtaskId, new 
WatermarkAlignmentEvent(maxAllowedWatermark));
+        // Because of Java-ThreadPoolExecutor will not schedule the period task
+        // if it throws an exception, so we should handle the potential 
exception like
+        // "subtask xx is not ready yet to receive events" to increase 
robustness.
+        try {
+            for (Integer subtaskId : subTaskIds) {
+                context.sendEventToSourceOperator(
+                        subtaskId, new 
WatermarkAlignmentEvent(maxAllowedWatermark));
+            }

Review Comment:
   Hi @LoveHeat , thanks for your feedback.
   
   As I said at FLINK-32362 before, I'm not sure what should we do when some 
subtasks are not ready.
   
   - Option1: Send event to all ready subtasks, and just ignore unready 
subtasks.
   - Option2: Don't send any event before all subtasks are ready.
   
   If we expect option1, we should ensure the event is sent to all ready 
subtasks.
   
   > In my opinion, if one task is during failing, other tasks maybe also 
during failing with high probability
   
   When `jobmanager.execution.failover-strategy` is region, and all subtasks 
don't have shuffle link. If subtask0  cannot start or fails, other subtasks 
should work well, right?
   
   



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