fredia commented on code in PR #24653:
URL: https://github.com/apache/flink/pull/24653#discussion_r1594925847
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccess.java:
##########
@@ -232,7 +232,9 @@ public FsMergingCheckpointStorageAccess
toFileMergingStorage(
FileMergingSnapshotManager mergingSnapshotManager, Environment
environment)
throws IOException {
return new FsMergingCheckpointStorageAccess(
- fileSystem,
+ /* Multiple subtask/threads would share one output stream,
+ SafetyNetWrapperFileSystem cannot be used to prevent different
threads from interfering with each other when exiting. */
+
FileSystem.getUnguardedFileSystem(checkpointsDirectory.toUri()),
Review Comment:
> I'm thinking could checkpointsDirectory as the parameter of
FsMergingCheckpointStorageAccess constructor?
👍 Agreed, I will update the constructor as your suggestion.
> Also, I have a concern here: When we use GuardedFileSystem, all streams
can be closed properly when the corresponding thread is exiting. After this
change, if we use UnguardedFileSystem, it may cause stream leak.
`FileMergingSnapshotManager` takes this responsibility,
`FileMergingSnapshotManager` would close all held physical files and streams
when the task executor close/shutdown.
--
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]