Skip to content

Conversation

@brandboat
Copy link
Member

@brandboat brandboat commented Oct 22, 2025

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.

Reviewers: Chia-Ping Tsai [email protected]

this.multiplier = multiplier;
this.maxInterval = maxInterval;
if (jitter < 0 || jitter > 1) {
throw new IllegalArgumentException("jitter must be between 0 and 1");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plesae include the jitter value in the error message. It will be very useful for debugging

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated in 5d15580

@chia7712 chia7712 merged commit 0facc3c into apache:trunk Nov 1, 2025
24 checks passed
@brandboat brandboat deleted the KAFKA-19813 branch November 3, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants