danny0405 commented on code in PR #19971:
URL: https://github.com/apache/hudi/pull/19971#discussion_r4025956909
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/heartbeat/HoodieHeartbeatClient.java:
##########
@@ -144,14 +146,45 @@ public void start(String instantTime) {
Heartbeat newHeartbeat = new Heartbeat();
newHeartbeat.setHeartbeatStarted(true);
instantToHeartbeatMap.put(instantTime, newHeartbeat);
- // Ensure heartbeat is generated for the first time with this blocking
call.
- // Since scheduler submits the task to a thread, no guarantee when that
thread will get CPU
- // cycles to generate the first heartbeat.
+ // Attempt the first heartbeat synchronously. A timed-out write is retried
by the scheduler;
+ // callers that need a confirmed heartbeat before proceeding can use
awaitHeartbeat().
Review Comment:
the `updateHeartbeat(String instantTime)` already sets up the heartbat time
through heartbeat.setLastHeartbeatTime(newHeartbeatTime);
> You’re right that validation calls isHeartbeatExpired(), but with a null
timestamp
this is the reader hearbeat behavior but since the commit happens on the
coordinator which shares the same heartbeat client which got updated from
writer heartbeat.
--
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]