[
https://issues.apache.org/jira/browse/FLINK-5214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15834469#comment-15834469
]
ASF GitHub Bot commented on FLINK-5214:
---------------------------------------
Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/3178#discussion_r97314933
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSnapshotContextSynchronousImpl.java
---
@@ -127,4 +128,38 @@ public OperatorStateCheckpointOutputStream
getRawOperatorStateOutput() throws Ex
return new DoneFuture<>(stream.closeAndGetHandle());
}
-}
\ No newline at end of file
+ private <T extends StreamStateHandle> void
closeAndUnregisterStream(NonClosingCheckpointOutputStream<T> stream) throws
IOException {
+ Preconditions.checkNotNull(stream);
+
+ closableRegistry.unregisterClosable(stream.getDelegate());
+ stream.getDelegate().close();
+ }
+
+ public void close() throws IOException {
--- End diff --
I would prefer `AutoCloseable` over `Closeable`, because the former is
general while the latter is more related to IO.
> Clean up checkpoint files when failing checkpoint operation on TM
> -----------------------------------------------------------------
>
> Key: FLINK-5214
> URL: https://issues.apache.org/jira/browse/FLINK-5214
> Project: Flink
> Issue Type: Bug
> Components: TaskManager
> Affects Versions: 1.2.0, 1.1.3
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Fix For: 1.2.0, 1.1.4
>
>
> When the {{StreamTask#performCheckpoint}} operation fails on a
> {{TaskManager}} potentially created checkpoint files are not cleaned up. This
> should be changed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)