Skip to content

KAFKA-19415 Shuffle the order of readPartitionInfo when fetching data. #19990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

oraen
Copy link

@oraen oraen commented Jun 18, 2025

Improve fairness of partition fetch order when clients fetch data to avoid partition starvation.
Randomly shuffles the readPartitionInfo sequence before iterating over it in the log read process.
This change helps to avoid persistent partition hotspots and ensures fairer resource utilization when processing fetch requests.
By shuffling the partitions, it prevents certain partitions from always being processed later, reducing the risk of starvation.
The performance impact is negligible since the list is typically small.

see https://issues.apache.org/jira/browse/KAFKA-19415

@github-actions github-actions bot added triage PRs from the community core Kafka Broker small Small PRs labels Jun 18, 2025
@oraen oraen changed the title Shuffle the order of readPartitionInfo when fetching data. KAFKA-19415 Shuffle the order of readPartitionInfo when fetching data. Jun 22, 2025
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Kafka Broker needs-attention small Small PRs triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant