Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/4883#discussion_r151940619
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
---
@@ -1041,27 +1065,27 @@ public void executeCheckpointing() throws Exception
{
checkpointMetrics.getAlignmentDurationNanos() / 1_000_000,
checkpointMetrics.getSyncDurationMillis());
}
- } finally {
- if (failed) {
- // Cleanup to release resources
- for (OperatorSnapshotResult
operatorSnapshotResult : operatorSnapshotsInProgress.values()) {
- if (null !=
operatorSnapshotResult) {
- try {
-
operatorSnapshotResult.cancel();
- } catch (Exception e) {
- LOG.warn("Could
not properly cancel an operator snapshot result.", e);
- }
+ } catch (Exception ex) {
+ // Cleanup to release resources
--- End diff --
Because this was moved from the `finally`-block into a `catch`-block where
it is clear that the code failed.
---