nsivabalan commented on code in PR #13088:
URL: https://github.com/apache/hudi/pull/13088#discussion_r2028017156
##########
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:
only if deletion failed. diff file storage scheme might behave differently.
So, if deletion failed for some reason we wanted to check if the file of
interest exists and if it exists, then we throw exception.
So, `exists` is only going to be invoked in the following case
- if additional files were found in markers compared to write statuses
- if deletion failed among the ones thats intended to be deleted during
reconciliation.
So, we should rarely hit this scenario
--
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]