You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/03/01 02:05:51 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #7997: [HUDI-5822] Fix FileId not found exception when FileId is passed to HoodieMergeHa...

danny0405 commented on code in PR #7997:
URL: https://github.com/apache/hudi/pull/7997#discussion_r1119831489


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/MarkerBasedRollbackStrategy.java:
##########
@@ -115,16 +115,24 @@ protected HoodieRollbackRequest getRollbackRequestForAppend(String markerFilePat
     // TODO(HUDI-1517) use provided marker-file's path instead
     Option<HoodieLogFile> latestLogFileOption = FSUtils.getLatestLogFile(table.getMetaClient().getFs(), partitionPath, fileId,
         HoodieFileFormat.HOODIE_LOG.getFileExtension(), baseCommitTime);
+
+    // Log file can be deleted if the commit to rollback is also the commit that created the fileGroup

Review Comment:
   Okay, seems here is the code you wanna folk from the listing based rollback strategy:
   
   ```java
                 // In case all data was inserts and the commit failed, delete the file belonging to that commit
                 // We do not know fileIds for inserts (first inserts are either log files or base files),
                 // delete all files for the corresponding failed commit, if present (same as COW)
                 hoodieRollbackRequests.add(getHoodieRollbackRequest(partitionPath, filesToDelete));
   
   ```



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