jiafu1115 commented on code in PR #20203:
URL: https://github.com/apache/kafka/pull/20203#discussion_r2462846515


##########
core/src/main/scala/kafka/server/BrokerServer.scala:
##########
@@ -591,6 +600,15 @@ class BrokerServer(
         "all of the SocketServer Acceptors to be started",
         enableRequestProcessingFuture, startupDeadline, time)
 
+      brokerReadyCallbacks.foreach { callback =>
+        try {
+          callback.onBrokerReady()

Review Comment:
   @chia7712 I summary the discussion for others' reference
   
   the idea is similar with initial delay. Since it’s about connecting to 
retrieve metadata information for topic based resource, I chose to reference 
the socket server being ready as the intial delay, which happens just before 
the broker transitions to the startup state.
   
   For metadata storage resources, I see three categories:
   1 Local machine resources – internal resources that require an initial delay.
   2 Other machines in the same cluster – internal but external to this broker.
   3 Resources in other clusters – fully external and generally uncontrollable.
   
   The key point is that initial delay is only meaningful for local resources. 
External resources may already be ready before the broker starts, so no initial 
delay is needed. By using the local socket ready state as the reference, we 
cover the most common scenario. That’s why I updated the comment to hint this: 
for topic-based metadata stored in the local cluster, the initialization 
reference is when the broker is ready.



-- 
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]

Reply via email to