the-other-tim-brown commented on code in PR #13577:
URL: https://github.com/apache/hudi/pull/13577#discussion_r2240796545


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/savepoint/SavepointActionExecutor.java:
##########
@@ -137,16 +138,18 @@ public HoodieSavepointMetadata execute() {
         }, null);
       }
 
-      HoodieSavepointMetadata metadata = 
TimelineMetadataUtils.convertSavepointMetadata(user, comment, latestFilesMap);
-      // Nothing to save in the savepoint
-      table.getActiveTimeline().createNewInstant(
-          instantGenerator.createNewInstant(HoodieInstant.State.INFLIGHT, 
HoodieTimeline.SAVEPOINT_ACTION, instantTime));
-      table.getActiveTimeline()
-          .saveAsComplete(
-              true, 
instantGenerator.createNewInstant(HoodieInstant.State.INFLIGHT, 
HoodieTimeline.SAVEPOINT_ACTION, instantTime), Option.of(metadata),
-              savepointCompletedInstant -> 
table.getMetaClient().getTableFormat().savepoint(savepointCompletedInstant, 
table.getContext(), table.getMetaClient(), table.getViewManager()));
-      LOG.info("Savepoint " + instantTime + " created");
-      return metadata;
+      try (TransactionManager transactionManager = new 
TransactionManager(config, table.getStorage())) {

Review Comment:
   Yes it can. I think it would be better to pass in the transaction manager 
from the write client instead of creating it in these action executors. This 
would avoid creating new instances of the clients for the lock provider and 
allow us to more easily clean up the "skipLock" concept by using the same 
TransactionManager for the whole path.



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