nsivabalan commented on code in PR #7875:
URL: https://github.com/apache/hudi/pull/7875#discussion_r1099497604
##########
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:
can you remind me where are we closing the metadata writer?
--
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]