Skip to content

Commit 2154e55

Browse files
MINOR: Prevent broker fencing by adjusting resendExponentialBackoff in BrokerLifecycleManager (apache#19061)
This PR reduces `maxInterval` for `resendExponentialBackoff` in `BrokerLifecycleManager` class from `broker.session.timeout.ms` to half of its value. Setting `maxInterval` to `broker.session.timeout.ms` caused brokers to be fenced if a resend attempt occurred near the timeout threshold, leading to unnecessary broker fencing. Reviewers: Colin P. McCabe <[email protected]>
1 parent 29115d5 commit 2154e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/kafka/server/BrokerLifecycleManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class BrokerLifecycleManager(
9393
* The exponential backoff to use for resending communication.
9494
*/
9595
private val resendExponentialBackoff =
96-
new ExponentialBackoff(100, 2, config.brokerSessionTimeoutMs.toLong, 0.02)
96+
new ExponentialBackoff(100, 2, config.brokerSessionTimeoutMs.toLong / 2, 0.02)
9797

9898
/**
9999
* The number of times we've tried and failed to communicate. This variable can only be

0 commit comments

Comments
 (0)