zuston commented on a change in pull request #18157:
URL: https://github.com/apache/flink/pull/18157#discussion_r785837813
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointMetadataOutputStream.java
##########
@@ -109,13 +119,19 @@ public void close() {
try {
out.close();
- fileSystem.delete(metadataFilePath, false);
+ if (!isRecoverableStream(out)) {
+ fileSystem.delete(metadataFilePath, false);
+ }
} catch (Throwable t) {
LOG.warn("Could not close the state stream for {}.",
metadataFilePath, t);
}
}
}
+ private boolean isRecoverableStream(FSDataOutputStream out) {
Review comment:
Sounds great!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]