tillrohrmann commented on a change in pull request #12670:
URL: https://github.com/apache/flink/pull/12670#discussion_r441470284



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -582,7 +583,18 @@ private void 
startTriggeringCheckpoint(CheckpointTriggerRequest request) {
 
                                                        return null;
                                                },
-                                               timer));
+                                               timer)
+                                       .exceptionally(error -> {
+                                               isTriggering = false;
+                                               if (!isShutdown()) {
+                                                       
ExceptionUtils.rethrow(error);

Review comment:
       ```suggestion
                                                        throw new 
CompletionException(error)
   ```
   
   is better because it won't extend the stack trace with another exception.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -582,7 +583,18 @@ private void 
startTriggeringCheckpoint(CheckpointTriggerRequest request) {
 
                                                        return null;
                                                },
-                                               timer));
+                                               timer)
+                                       .exceptionally(error -> {
+                                               isTriggering = false;

Review comment:
       I think we don't need to reset the internal state of 
`CheckpointCoordinator` here because it either is shut down or it will fail.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -582,7 +583,18 @@ private void 
startTriggeringCheckpoint(CheckpointTriggerRequest request) {
 
                                                        return null;
                                                },
-                                               timer));
+                                               timer)
+                                       .exceptionally(error -> {
+                                               isTriggering = false;
+                                               if (!isShutdown()) {
+                                                       
ExceptionUtils.rethrow(error);
+                                               } else if (error instanceof 
RejectedExecutionException) {
+                                                       LOG.debug("Execution 
rejected during shutdown");
+                                               } else {
+                                                       LOG.warn("Error 
encountered during shutdown", error);
+                                               }

Review comment:
       Can't we collapse these two cases into logging `error` on debug if 
`isShutdown() == true`?




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