cshuo commented on code in PR #20148:
URL: https://github.com/apache/hudi/pull/20148#discussion_r4143099475
##########
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();
Review Comment:
HoodieTimer calculates elapsed time using System.currentTimeMillis(). If the
JobManager’s clock changes during a sync—for example, during a long metastore
retry—a backward adjustment can produce a negative duration, and a forward
adjustment can inflate it. That sample affects the histogram statistics until
it leaves the 100-sample window.
Suggested fix: Measure elapsed time with System.nanoTime() and convert to
milliseconds. Continue using System.currentTimeMillis() for the last-success
timestamp.
--
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]