You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/11/30 03:08:16 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #7037: [HUDI-5078] Fixing determination of table service for metadata calls
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org