Zakelly commented on code in PR #24762: URL: https://github.com/apache/flink/pull/24762#discussion_r1598038977
########## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ########## @@ -600,15 +612,24 @@ public void restoreStateHandles( knownPhysicalFiles.computeIfAbsent( fileHandle.getFilePath(), path -> { + boolean managedByFileMergingManager = + isManagedByFileMergingManager( + path, + subtaskKey, + fileHandle.getScope()); PhysicalFileDeleter fileDeleter = - (isManagedByFileMergingManager( - path, - subtaskKey, - fileHandle.getScope())) + managedByFileMergingManager Review Comment: Given that there is `owned` attribute within the `PhysicalFile`, how about remove this diversion and wrap everything within the `PhysicalFile`? ########## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ########## @@ -494,6 +500,12 @@ public void reusePreviousStateHandle( } } + public void discardSingleLogicalFile(LogicalFile logicalFile, long checkpointId) + throws IOException { + logicalFile.discardWithCheckpointId(checkpointId); + spaceStat.onLogicalFileDelete(logicalFile.getLength()); Review Comment: IIUC, this should also be protected by `PhysicalFile#isOwned()`. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org