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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -349,7 +349,7 @@ protected void preCommit(HoodieInstant inflightInstant, 
HoodieCommitMetadata met
   protected void writeTableMetadata(HoodieTable table, String instantTime, 
String actionType, HoodieCommitMetadata metadata) {
     context.setJobStatus(this.getClass().getSimpleName(), "Committing to 
metadata table: " + config.getTableName());
     table.getMetadataWriter(instantTime).ifPresent(w -> 
((HoodieTableMetadataWriter) w).update(metadata, instantTime,
-        table.isTableServiceAction(actionType)));
+        table.isTableServiceAction(new HoodieInstant(State.INFLIGHT, 
actionType, instantTime))));
   }

Review Comment:
   Can we just pass around the `actionType` and `instantTime` instead of 
constructing the dummy instant on the fly ?
   The instant can be constructed lazily within method `#isTableServiceAction `.



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