StephanEwen commented on a change in pull request #15557:
URL: https://github.com/apache/flink/pull/15557#discussion_r612358927



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinator.java
##########
@@ -202,8 +202,7 @@ default void notifyCheckpointAborted(long checkpointId) {}
          * target TaskManager. The future is completed exceptionally if the 
event cannot be sent.
          * That includes situations where the target task is not running.
          */
-        CompletableFuture<Acknowledge> sendEvent(OperatorEvent evt, int 
targetSubtask)
-                throws TaskNotRunningException;
+        CompletableFuture<Acknowledge> sendEvent(OperatorEvent evt, int 
targetSubtask);

Review comment:
       I was wondering here as well a bit.
   
   For the next PR (introducing `SubtaskGateway`), the contract I want to have 
is the following:
     - The `SubtaskGateway` only throws an Exception before it is ready. That 
should not really be possible to happen for callers, because they should not 
have access to the gateway before.
     - Once it was ready, it never throws exceptions, but only completes the 
future exceptionally. Callers can mostly decide to ignore the result of the 
future, if they handle the `notifyTaskFaile()` call. If futures fail due to RPC 
loss, the task will also be failed, so no need to handle the future extra.
     - In the next version of the fix branch, there is no checked exception any 
more on the subtaskGateway send method.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to