You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/17 21:26:44 UTC

[GitHub] [kafka] soarez commented on a diff in pull request #12174: KAFKA-13907: Fix hanging ServerShutdownTest.testCleanShutdownWithKRaftControllerUnavailable

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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org