davidradl commented on code in PR #26497:
URL: https://github.com/apache/flink/pull/26497#discussion_r2054132828


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/ForStFlinkFileSystem.java:
##########
@@ -305,7 +306,8 @@ public synchronized FileStatus getFileStatus(Path path) 
throws IOException {
         if (mappingEntry == null) {
             return new FileStatusWrapper(delegateFS.getFileStatus(path), path);
         }
-        if (FileOwnershipDecider.shouldAlwaysBeLocal(path)) {
+        if (FileOwnershipDecider.shouldAlwaysBeLocal(path)
+                && mappingEntry.getFileOwnership() != FileOwnership.NOT_OWNED) 
{

Review Comment:
   I see in the Jira it says:
   "When restored, the file is existed, but fails because it always try to find 
a sst in the local filesystem:"
   I do not follow this. Why is 
`FileOwnershipDecider.shouldAlwaysBeLocal(path)` true for a non local file?
   When this method is explicitly checking whether the file is an sst file?
   ```
   public static boolean shouldAlwaysBeLocal(Path filePath) {
    return !isSstFile(filePath);
   }
   ```
   
   Would it be possible to ensure earlier in the code that an sst file is 
always seen as an sst file? So the original  check works as expected. 
   
   
   
   
   
   
   
   



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

Reply via email to