Skip to content

KAFKA-19339: Move DelayedFetch to server module - #23383

Open
brandboat wants to merge 3 commits into
apache:trunkfrom
brandboat:KAFKA-19339
Open

KAFKA-19339: Move DelayedFetch to server module#23383
brandboat wants to merge 3 commits into
apache:trunkfrom
brandboat:KAFKA-19339

Conversation

@brandboat

@brandboat brandboat commented Sep 6, 2026

Copy link
Copy Markdown
Member

Move DelayedFetch to server module

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions Bot added core Kafka Broker storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature build Gradle build or GitHub Actions labels Sep 6, 2026
* @param replicaId The replica ID
* @return Whether the leader should throttle the replica
*/
boolean shouldLeaderThrottle(ReplicaQuota quota, TopicPartitionLog partition, int replicaId);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the implementation is not really related to ReplicaManager, so converting it to a static helper could streamline this interface

LinkedHashMap<TopicIdPartition, PartitionData> fetchInfos = new LinkedHashMap<>();
fetchPartitionStatus.forEach((topicIdPartition, status) -> fetchInfos.put(topicIdPartition, status.fetchInfo()));

LinkedHashMap<TopicIdPartition, LogReadResult> logReadResults = replicaManager.readFromLogByPurgatory(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We get the logReadResults and then convert them to FetchPartitionDataimmediately, so maybe we could letreadFromLogByPurgatoryreturnFetchPartitionData` directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions core Kafka Broker storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants