Zakelly commented on code in PR #25924: URL: https://github.com/apache/flink/pull/25924#discussion_r1917823612
########## flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/filemapping/FileMappingManager.java: ########## @@ -231,14 +270,23 @@ private boolean isParentDir(String path, String dir) { } } - /** A wrapper of real path. */ - public static class RealPath { - public final Path path; - public final boolean isLocal; + public void giveUpOwnership(Path path) { + MappingEntry mappingEntry = mappingTable.getOrDefault(path.toString(), null); + Preconditions.checkArgument( + mappingEntry != null, + "Try to give up ownership of a file that is not in mapping table: " + path); + Preconditions.checkArgument( + mappingEntry.fileOwnership != FileOwnership.PRIVATE_OWNED_BY_DB, + "Try to give up ownership of a file that is not shareable: " + mappingEntry); Review Comment: Please use the string template version of `checkArgument` here, to avoid much string generation overhead. -- 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