nsivabalan commented on a change in pull request #5114:
URL: https://github.com/apache/hudi/pull/5114#discussion_r834830708
##########
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:
we should see if we can make this more readable or nicer. I will approve
it for now. but see if we can improve this sometime.
--
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]