Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/5239#discussion_r168169168
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
---
@@ -916,57 +916,78 @@ private void handleExecutionException(Exception e) {
CheckpointingOperation.AsynCheckpointState.COMPLETED,
CheckpointingOperation.AsynCheckpointState.RUNNING);
- try {
- cleanup();
- } catch (Exception cleanupException) {
- e.addSuppressed(cleanupException);
- }
+ if (asyncCheckpointState.compareAndSet(
+
CheckpointingOperation.AsynCheckpointState.RUNNING,
+
CheckpointingOperation.AsynCheckpointState.DISCARDED)) {
--- End diff --
ð
---