Lianet Magrans created KAFKA-17470: -------------------------------------- Summary: 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 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)