codope commented on code in PR #13088:
URL: https://github.com/apache/hudi/pull/13088#discussion_r2027968965


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTable.java:
##########
@@ -753,7 +755,13 @@ private void 
deleteInvalidFilesByPartitions(HoodieEngineContext context, Map<Str
           LOG.info("Deleting invalid data file=" + partitionFilePair);
           // Delete
           try {
-            storage.deleteFile(new StoragePath(partitionFilePair.getValue()));
+            StoragePath pathToDelete = new 
StoragePath(partitionFilePair.getValue());
+            boolean deletionSuccess = storage.deleteFile(pathToDelete);
+            if (!deletionSuccess && storage.exists(pathToDelete)) {

Review Comment:
   do we need to do costly `storage.exists` additionally? Anyway, if file is 
not found at this point, then it's a no-op in the catch block.



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