rkhachatryan commented on code in PR #24487: URL: https://github.com/apache/flink/pull/24487#discussion_r1521803705
########## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java: ########## @@ -1046,27 +1046,32 @@ private void onTriggerFailure( CheckpointProperties checkpointProperties, Throwable throwable) { // beautify the stack trace a bit - throwable = ExceptionUtils.stripCompletionException(throwable); - try { - coordinatorsToCheckpoint.forEach( - OperatorCoordinatorCheckpointContext::abortCurrentTriggering); + throwable = ExceptionUtils.stripCompletionException(throwable); - final CheckpointException cause = - getCheckpointException( - CheckpointFailureReason.TRIGGER_CHECKPOINT_FAILURE, throwable); + try { + coordinatorsToCheckpoint.forEach( + OperatorCoordinatorCheckpointContext::abortCurrentTriggering); - if (checkpoint != null && !checkpoint.isDisposed()) { - synchronized (lock) { - abortPendingCheckpoint(checkpoint, cause); + final CheckpointException cause = + getCheckpointException( + CheckpointFailureReason.TRIGGER_CHECKPOINT_FAILURE, throwable); + + if (checkpoint != null && !checkpoint.isDisposed()) { + synchronized (lock) { + abortPendingCheckpoint(checkpoint, cause); + } + } else { + failureManager.handleCheckpointException( + checkpoint, checkpointProperties, cause, null, job, null, statsTracker); } - } else { - failureManager.handleCheckpointException( - checkpoint, checkpointProperties, cause, null, job, null, statsTracker); + } finally { + isTriggering = false; + executeQueuedRequest(); } - } finally { - isTriggering = false; - executeQueuedRequest(); + } catch (Throwable secondThrowable) { Review Comment: Can't we have just one try/catch block? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org