soarez commented on code in PR #12174:
URL: https://github.com/apache/kafka/pull/12174#discussion_r875274700


##########
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala:
##########
@@ -431,8 +431,18 @@ class BrokerLifecycleManager(val config: KafkaConfig,
     }
 
     override def onTimeout(): Unit = {
-      info("Unable to send a heartbeat because the RPC got timed out before it 
could be sent.")
-      scheduleNextCommunicationAfterFailure()
+      if (_state == BrokerState.PENDING_CONTROLLED_SHUTDOWN) {

Review Comment:
   If we modify the interface in this way it looks like the timeout refers to 
the overall shutdown operation, but the timeout is specific to the controlled 
shutdown attempt.
   
   Since the test applies only to KRaft we can cast the broker to the known 
type (`BrokerServer`) and modify a new _VisibleForTesting_ variable that holds 
the default timeout. WDYT?



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