You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/04/12 15:42:34 UTC

[GitHub] [flink] StefanRRichter commented on a change in pull request #7571: [FLINK-10724] Refactor failure handling in check point coordinator

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

 ##########
 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:
   I think this line is executed in the job master's main-thread and should therefore not be blocking. I think the it would be better to chain `failGlobal` after the `shouldFailJobFuture` completion to complete async in the job master main-thread.

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


With regards,
Apache Git Services