Myasuka commented on a change in pull request #17151:
URL: https://github.com/apache/flink/pull/17151#discussion_r702678928



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -327,7 +327,11 @@ public CheckpointCoordinator(
 
         try {
             this.checkpointStorageView = 
checkpointStorage.createCheckpointStorage(job);
-            checkpointStorageView.initializeBaseLocations();
+
+            // directory will not be created if checkpointing is disabled
+            if (baseInterval != Long.MAX_VALUE) {

Review comment:
       I prefer to leverage `isPeriodicCheckpointingConfigured()` method 
directly, so that we could also avoid the comment.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccess.java
##########
@@ -110,9 +110,11 @@ public boolean supportsHighlyAvailableStorage() {
 
     @Override
     public void initializeBaseLocations() throws IOException {
-        fileSystem.mkdirs(sharedStateDirectory);
-        fileSystem.mkdirs(taskOwnedStateDirectory);
-        baseLocationsInitialized = true;
+        if (!baseLocationsInitialized) {

Review comment:
       Why we must change this?




-- 
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]


Reply via email to