You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "brandboat (via GitHub)" <gi...@apache.org> on 2025/10/22 15:23:43 UTC
[PR] KAFKA-19813: Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager [kafka]
brandboat opened a new pull request, #20748:
URL: https://github.com/apache/kafka/pull/20748
In StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager
we use max.poll.interval.ms (default 300000) as the jitter value. Although RequestState.remainingBackoffMs guards with Math.max(0, …), which won’t make the value become negative, using a jitter that isn’t in (0–1) is unexpected.
In addition, we should validate that ExponentialBackoff receives a jitter strictly within (0, 1) to prevent this scenario in the future.
--
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
Re: [PR] KAFKA-19813: Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager [kafka]
Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on code in PR #20748:
URL: https://github.com/apache/kafka/pull/20748#discussion_r2481966894
##########
clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java:
##########
@@ -42,6 +42,9 @@ public ExponentialBackoff(long initialInterval, int multiplier, long maxInterval
this.initialInterval = Math.min(maxInterval, initialInterval);
this.multiplier = multiplier;
this.maxInterval = maxInterval;
+ if (jitter < 0 || jitter > 1) {
+ throw new IllegalArgumentException("jitter must be between 0 and 1");
Review Comment:
thanks, updated in [5d15580](https://github.com/apache/kafka/pull/20748/commits/5d15580679eb2dcde4504fa1a6a7accaa8241421)
--
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
Re: [PR] KAFKA-19813: Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #20748:
URL: https://github.com/apache/kafka/pull/20748
--
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
Re: [PR] KAFKA-19813: Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #20748:
URL: https://github.com/apache/kafka/pull/20748#discussion_r2481887160
##########
clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java:
##########
@@ -42,6 +42,9 @@ public ExponentialBackoff(long initialInterval, int multiplier, long maxInterval
this.initialInterval = Math.min(maxInterval, initialInterval);
this.multiplier = multiplier;
this.maxInterval = maxInterval;
+ if (jitter < 0 || jitter > 1) {
+ throw new IllegalArgumentException("jitter must be between 0 and 1");
Review Comment:
Plesae include the `jitter` value in the error message. It will be very useful for debugging
--
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