steveloughran commented on PR #14501:
URL: https://github.com/apache/iceberg/pull/14501#issuecomment-3780489543

   started the new PR. Also discovered a regression here, the moveToTrash() 
code raises an FNFE if there's no file/dir at the end of the path.
   
   ```
   Caused by: java.io.FileNotFoundException: File 
file:/var/folders/4n/w4cjr_d95kg9bxkl6sz3n3ym0000gr/T/junit-2971716127417174714/missing
 does not exist
        at 
org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:980)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:1301)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:970)
        at 
org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:462)
        at 
org.apache.hadoop.fs.TrashPolicyDefault.moveToTrash(TrashPolicyDefault.java:139)
        at org.apache.hadoop.fs.Trash.moveToTrash(Trash.java:140)
        at 
org.apache.iceberg.hadoop.HadoopFileIO.deletePath(HadoopFileIO.java:247)
        at 
org.apache.iceberg.hadoop.HadoopFileIO.deleteFile(HadoopFileIO.java:109)
        ... 4 more
   ```
   
   This means that if ever a file which has already been deleted is deleted 
again: failure. Whereas filesystem.delete() is just a no-op.
   
   Going to catch an FNFE in moving a file.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to