You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Rajini Sivaram (JIRA)" <ji...@apache.org> on 2018/06/06 12:17:00 UTC

[jira] [Resolved] (KAFKA-6877) Remove completedFetch upon a failed parse if it contains no records.

     [ https://issues.apache.org/jira/browse/KAFKA-6877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajini Sivaram resolved KAFKA-6877.
-----------------------------------
    Resolution: Fixed
      Reviewer: Jiangjie Qin

> Remove completedFetch upon a failed parse if it contains no records.
> --------------------------------------------------------------------
>
>                 Key: KAFKA-6877
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6877
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, consumer
>    Affects Versions: 1.0.0, 0.11.0.2, 1.1.0, 1.0.1
>            Reporter: Adem Efe Gencer
>            Assignee: Adem Efe Gencer
>            Priority: Major
>             Fix For: 2.0.0
>
>
> This patch removed a completedFetch from the completedFetches queue upon a failed parse if it contains no records. The following scenario explains why this is needed for an instance of this case – i.e. in TopicAuthorizationException.
> 0. Let's assume a scenario, in which the consumer is attempting to read from a topic without the necessary read permission.
> 1. In Fetcher#fetchedRecords(), after peeking the completedFetches, the Fetcher#parseCompletedFetch(CompletedFetch) throws a TopicAuthorizationException (as expected).
> 2. Fetcher#fetchedRecords() passes the TopicAuthorizationException up without having a chance to poll completedFetches. So, the same completedFetch remains at the completedFetches queue.
> 3. Upon following calls to Fetcher#fetchedRecords(), peeking the completedFetches will always return the same completedFetch independent of any updates to the ACL that the topic is trying to read from.
> 4. Hence, despite the creation of an ACL with correct permissions, once the consumer sees the TopicAuthorizationException, it will be unable to recover without a bounce.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)