yihua commented on code in PR #6939:
URL: https://github.com/apache/hudi/pull/6939#discussion_r1024558833


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackHelper.java:
##########
@@ -135,7 +136,10 @@ List<Pair<String, HoodieRollbackStat>> 
maybeDeleteAndCollectStats(HoodieEngineCo
           if (doDelete) {
             Map<HoodieLogBlock.HeaderMetadataType, String> header = 
generateHeader(instantToRollback.getTimestamp());
             // if update belongs to an existing log file
-            writer.appendBlock(new HoodieCommandBlock(header));
+            // use the log file path from AppendResult in case the file handle 
may roll over
+            filePath = writer.appendBlock(new 
HoodieCommandBlock(header)).logFile().getPath();
+          } else {
+            filePath = writer.getLogFile().getPath();

Review Comment:
   Could we add a unit test for the logic? 



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