yihua commented on a change in pull request #5114:
URL: https://github.com/apache/hudi/pull/5114#discussion_r834858181



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java
##########
@@ -237,18 +238,32 @@ private void rollBackIndex() {
   }
 
   protected void finishRollback(HoodieInstant inflightInstant, 
HoodieRollbackMetadata rollbackMetadata) throws HoodieIOException {
+    boolean enableLocking = (!skipLocking && !skipTimelinePublish);
     try {
-      if (!skipLocking) {
+      if (enableLocking) {
         this.txnManager.beginTransaction(Option.empty(), Option.empty());
       }
-      writeTableMetadata(rollbackMetadata);
-      
table.getActiveTimeline().transitionRollbackInflightToComplete(inflightInstant,
-          TimelineMetadataUtils.serializeRollbackMetadata(rollbackMetadata));
-      LOG.info("Rollback of Commits " + rollbackMetadata.getCommitsRollback() 
+ " is complete");
+
+      // If publish the rollback to the timeline, we first write the rollback 
metadata
+      // to metadata table
+      if (!skipTimelinePublish) {

Review comment:
       Makes sense.  I'll refactor this later on.




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