This is an automated email from the ASF dual-hosted git repository.
schofielaj pushed a commit to branch 4.2
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.2 by this push:
new c529951eb37 KAFKA-19929: Fix polling delay for share consumer in
record-limit mode (#21007)
c529951eb37 is described below
commit c529951eb37890257b886fc227555667c2479491
Author: Andrew Schofield <[email protected]>
AuthorDate: Fri Nov 28 09:26:17 2025 +0000
KAFKA-19929: Fix polling delay for share consumer in record-limit mode
(#21007)
In record-limit mode, the share consume request manager was varying the
time to wait between polls depending on whether there might be more
requests to send in the future. However, this was based on a mistaken
understanding of how the polling logic works.
Reviewers: Lianet Magrans <[email protected]>
---
.../clients/consumer/internals/ShareConsumeRequestManager.java | 9 ---------
1 file changed, 9 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java
b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java
index c727cfad625..fa8f1fd3eed 100644
---
a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java
+++
b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java
@@ -769,15 +769,6 @@ public class ShareConsumeRequestManager implements
RequestManager, MemberStateLi
return false;
}
- @Override
- public long maximumTimeToWait(long currentTimeMs) {
- // When fetching records and there is no chosen node for fetching, we
do not want to wait for the next poll in record_limit mode.
- if (isShareAcquireModeRecordLimit() && fetchMoreRecords &&
subscriptions.numAssignedPartitions() > 0 && fetchRecordsNodeId.get() == -1) {
- return 0L;
- }
- return Long.MAX_VALUE;
- }
-
private void handleShareFetchSuccess(Node fetchTarget,
ShareFetchRequestData requestData,
ClientResponse resp) {