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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/RestorePlanActionExecutor.java:
##########
@@ -90,11 +100,23 @@ public Option<HoodieRestorePlan> execute() {
       HoodieRestorePlan restorePlan = new 
HoodieRestorePlan(instantsToRollback, LATEST_RESTORE_PLAN_VERSION, 
savepointToRestoreTimestamp);
       table.getActiveTimeline().saveToRestoreRequested(restoreInstant, 
restorePlan);
       table.getMetaClient().reloadActiveTimeline();
-      LOG.info("Requesting Restore with instant time " + restoreInstant);
+      LOG.info("Requesting Restore with instant time {}", restoreInstant);
       return Option.of(restorePlan);
-    } catch (HoodieIOException e) {
-      LOG.error("Got exception when saving restore requested file", e);
-      throw e;
+    } catch (Exception e) {
+      throw new HoodieException("Unable to restore to instant: " + 
savepointToRestoreTimestamp, e);
+    }
+  }
+
+  private Predicate<HoodieInstant> constructInstantFilter(HoodieTableConfig 
tableConfig, String completionTime) {

Review Comment:
   I think we can reuse this comparactor part with 
`SavepointHelpers.validateSavepointRestore` so that we avoid to maintain this 
intelligenable logic in one place and doc it well with some illustrations.



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