[
https://issues.apache.org/jira/browse/FLINK-5214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15834594#comment-15834594
]
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_r97324700
--- 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 --
Of course, but you can and should always pick a more specific exception on
the signature of your implementation. If `IOException` or a subclass is
appropriate here, then you could also go with `Closeable` of course.
> 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)