danny0405 commented on code in PR #8430:
URL: https://github.com/apache/hudi/pull/8430#discussion_r1182226644
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java:
##########
@@ -297,4 +301,35 @@ protected void dropBootstrapIndexIfNeeded(HoodieInstant
instantToRollback) {
BootstrapIndex.getBootstrapIndex(table.getMetaClient()).dropIndex();
}
}
+
+ private void backupRollbackInstantsIfNeeded() {
+ if (!config.shouldBackupRollbacks()) {
+ // Backup not required
+ return;
+ }
+
+ Path backupDir = new Path(config.getRollbackBackupDirectory());
+ if (!backupDir.isAbsolute()) {
+ // Path specified is relative to the meta directory
+ backupDir = new Path(table.getMetaClient().getMetaPath(),
config.getRollbackBackupDirectory());
+ }
+
+ // Determine the instants to backup. Completed and inflight instants are
backed up.
+ HoodieActiveTimeline activeTimeline = table.getActiveTimeline();
+ List<HoodieInstant> instantsToBackup = new ArrayList<HoodieInstant>(3);
+ instantsToBackup.add(instantToRollback);
Review Comment:
Some question:
1. why we also back up the inflight instant when the instant is complete?
2. what kind of info from the instant is useful for debugging from your
side, can we make it more light-weight?
--
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]