cmccabe commented on code in PR #18009:
URL: https://github.com/apache/kafka/pull/18009#discussion_r1866761231
##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -306,8 +306,11 @@ ReplicaPlacer replicaPlacer() {
*/
public void activate() {
heartbeatManager = new BrokerHeartbeatManager(logContext, time,
sessionTimeoutNs);
+ long nowNs = time.nanoseconds();
for (BrokerRegistration registration : brokerRegistrations.values()) {
heartbeatManager.register(registration.id(),
registration.fenced());
+ heartbeatManager.tracker().updateContactTime(
+ new BrokerIdAndEpoch(registration.id(), registration.epoch()),
nowNs);
Review Comment:
I think it's OK to add them here just for consistency with the
`processBrokerHeartbeat` code, which also adds them. It shouldn't delay
anything; the tracker just manages last contact times.
In the case where both a fenced and an unfenced broker had timed out, the
code in `maybeFenceOneStaleBroker` would remove the fenced one from the
tracker, do nothing, and then reschedule `maybeFenceOneStaleBroker` immediately
as the next controllerr event. So there is no delay really.
--
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]