You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kuan Po Tseng (Jira)" <ji...@apache.org> on 2025/10/20 11:29:00 UTC

[jira] [Created] (KAFKA-19813) Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager

Kuan Po Tseng created KAFKA-19813:
-------------------------------------

             Summary: Incorrect jitter value in StreamsGroupHeartbeatRequestManager and AbstractHeartbeatRequestManager
                 Key: KAFKA-19813
                 URL: https://issues.apache.org/jira/browse/KAFKA-19813
             Project: Kafka
          Issue Type: Bug
          Components: clients, consumer
            Reporter: Kuan Po Tseng
            Assignee: Kuan Po Tseng


see https://github.com/apache/kafka/pull/14873#discussion_r2442794887, 

In below code snippets
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java#L116
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java#L333

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 message was sent by Atlassian Jira
(v8.20.10#820010)