You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/07 07:43:49 UTC

[GitHub] [flink] rkhachatryan commented on a diff in pull request #20091: [FLINK-27570][runtime] Fix initialize base locations for checkpoint

rkhachatryan commented on code in PR #20091:
URL: https://github.com/apache/flink/pull/20091#discussion_r915560439


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccess.java:
##########
@@ -113,8 +113,14 @@ public boolean supportsHighlyAvailableStorage() {
 
     @Override
     public void initializeBaseLocationsForCheckpoint() throws IOException {
-        fileSystem.mkdirs(sharedStateDirectory);
-        fileSystem.mkdirs(taskOwnedStateDirectory);
+        if (!fileSystem.mkdirs(sharedStateDirectory)) {

Review Comment:
   I'm wondering whether this check is sufficient. `mkdirs` javadoc says:
   `@return true if at least one new directory has been created, false otherwise`
   
   "at least one" confuses me; but probably an additional check here would be an overkill because it's only an optimization.
   
   WDYT?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org