You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/07/31 09:42:58 UTC

[GitHub] [hudi] codope commented on a diff in pull request #9165: [HUDI-6517] Throw error if deletion of invalid data file fails

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTable.java:
##########
@@ -688,7 +688,10 @@ private void deleteInvalidFilesByPartitions(HoodieEngineContext context, Map<Str
           LOG.info("Deleting invalid data file=" + partitionFilePair);
           // Delete
           try {
-            fileSystem.delete(new Path(partitionFilePair.getValue()), false);
+            boolean result = fileSystem.delete(new Path(partitionFilePair.getValue()), false);
+            if (!result) {

Review Comment:
   Doing fs.exists check everytime may be ineffcient. Why not ignore i.e catch and just log a warning? If the intention is to delete and file does not already exist then what's point of retrying?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org