hudi-agent commented on code in PR #20148:
URL: https://github.com/apache/hudi/pull/20148#discussion_r4145239764
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -476,9 +485,20 @@ private void syncHive() {
* Sync hoodie table metadata to Hive metastore.
*/
public void doSyncHive() {
- try (HiveSyncTool syncTool = hiveSyncContext.hiveSyncTool()) {
- syncTool.syncHoodieTable();
+ HoodieTimer timer = HoodieTimer.start();
+ try {
Review Comment:
🤖 nit: the nested try, the early `return` and the three `markSyncXxx` calls
make the outcome hard to follow. Could you track a `boolean succeeded` and
record the metric once in a `finally`, e.g. `succeeded =
syncTool.isSyncClientInitialized(); if (succeeded) {
syncTool.syncHoodieTable(); }`?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]