You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lianet Magrans (Jira)" <ji...@apache.org> on 2024/09/03 13:39:00 UTC
[jira] [Assigned] (KAFKA-17470) CommitRequestManager should record failed request only once even if multiple errors in response
[ https://issues.apache.org/jira/browse/KAFKA-17470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lianet Magrans reassigned KAFKA-17470:
--------------------------------------
Assignee: TengYao Chi
> CommitRequestManager should record failed request only once even if multiple errors in response
> -----------------------------------------------------------------------------------------------
>
> Key: KAFKA-17470
> URL: https://issues.apache.org/jira/browse/KAFKA-17470
> Project: Kafka
> Issue Type: Bug
> Components: clients, consumer
> Reporter: Lianet Magrans
> Assignee: TengYao Chi
> Priority: Major
> Labels: consumer-threading-refactor, kip-848-client-support
> Fix For: 4.0.0
>
>
> The commitRequestManager calls onFailedAttempt to register a failed request, and this call directly affects the count of attempts, considered to determine the backoff to apply. Therefore, this onFailedAttempts should only be called once per request, but currently the CommitRequestManager may call it multiple times for a single request (if the response contains multiple partition errors):
> - on commit: [https://github.com/apache/kafka/blob/2f9b23625917fed841a176a73bbbc02bfa330a2d/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L726]
> - on fetch: [https://github.com/apache/kafka/blob/2f9b23625917fed841a176a73bbbc02bfa330a2d/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L1049]
> We should ensure that onFailedAttempt is only called once per request, and add a test that covers both cases above, of responses with multiple partition errors in it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)