chia7712 commented on code in PR #20046:
URL: https://github.com/apache/kafka/pull/20046#discussion_r2299617791


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -513,6 +513,11 @@ class KafkaConfig private(doLog: Boolean, val props: 
util.Map[_, _])
     require(replicaFetchWaitMaxMs <= replicaLagTimeMaxMs, 
"replica.fetch.wait.max.ms should always be less than or equal to 
replica.lag.time.max.ms" +
       " to prevent frequent changes in ISR")
 
+    if (brokerHeartbeatIntervalMs * 2 > brokerSessionTimeoutMs) {
+      error(s"${KRaftConfigs.BROKER_HEARTBEAT_INTERVAL_MS_CONFIG} 
($brokerHeartbeatIntervalMs ms) must be less than or equal to half of the 
${KRaftConfigs.BROKER_SESSION_TIMEOUT_MS_CONFIG} ($brokerSessionTimeoutMs ms). 
" +

Review Comment:
   Yes, it would be better to fail fast. However, since session timeout is used 
by the quorum controller, the broker itself is not aware of the actual session 
timeout configured for the quorum controller. Perhaps we could improve the 
error message to make this distinction cleaer, incorporating the above 
explanation



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to