danny0405 commented on code in PR #7875:
URL: https://github.com/apache/hudi/pull/7875#discussion_r1099499328
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkTableServiceClient.java:
##########
@@ -175,11 +171,7 @@ public HoodieFlinkTable<?> getHoodieTable() {
@Override
public void writeTableMetadata(HoodieTable table, String instantTime, String
actionType, HoodieCommitMetadata metadata) {
- try (HoodieBackedTableMetadataWriter metadataWriter =
initMetadataWriter()) {
- metadataWriter.update(metadata, instantTime,
getHoodieTable().isTableServiceAction(actionType, instantTime));
- } catch (Exception e) {
- throw new HoodieException("Failed to update metadata", e);
- }
+ table.getMetadataWriter(instantTime).ifPresent(w ->
((HoodieTableMetadataWriter) w).update(metadata, instantTime,
table.isTableServiceAction(actionType, instantTime)));
Review Comment:
After each commit, although I think is not a good design.
--
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]