yanghua commented on a change in pull request #7571: [FLINK-10724] Refactor 
failure handling in check point coordinator
URL: https://github.com/apache/flink/pull/7571#discussion_r275143507
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
 ##########
 @@ -699,13 +701,25 @@ public void declineCheckpoint(DeclineCheckpoint decline) 
{
                final CheckpointCoordinator checkpointCoordinator = 
executionGraph.getCheckpointCoordinator();
 
                if (checkpointCoordinator != null) {
-                       getRpcService().execute(() -> {
+                       CompletableFuture<Boolean> shouldFailJobFuture = 
getRpcService().execute(() -> {
                                try {
-                                       
checkpointCoordinator.receiveDeclineMessage(decline);
+                                       return 
checkpointCoordinator.receiveDeclineMessage(decline);
                                } catch (Exception e) {
                                        log.error("Error in 
CheckpointCoordinator while processing {}", decline, e);
                                }
+
+                               return false;
                        });
+
+                       try {
+                               boolean shouldFailJob = 
shouldFailJobFuture.get(rpcTimeout.toMilliseconds(), TimeUnit.MILLISECONDS);
 
 Review comment:
   Good suggestion, accepted.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to