AlexYinHan commented on code in PR #25924:
URL: https://github.com/apache/flink/pull/25924#discussion_r1917688495


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java:
##########
@@ -364,11 +444,31 @@ public void prepareDirectories() throws Exception {
         }
     }
 
+    public void buildDataTransferStrategy() {

Review Comment:
   The creation order of these StateBackend components can bring some troubles. 
When building the state backend, we:
    -  call ```prepareDirectories```, to create directories for the DB. By 
default we clear the target directory so we have a clean path for the DB. 
However, if we decide to reuse some files from the Checkpoint, we should keep 
the target directory as it is. That is decided base on 
```isDbPathUnderCheckpointPath```
    - also in ```prepareDirectories```, we create a ```ForStFlinkFileSystem```
    - then we can construct the ```DataTransferStrategy``` based on a 
nullable```ForStFlinkFileSystem``` and ```isDbPathUnderCheckpointPath```
   
   Therefore, it might be better to compute ```isDbPathUnderCheckpointPath``` 
before the above steps.



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