kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajini Sivaram (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-6877) Remove completedFetch upon a failed parse if it contains no records.
Date Wed, 06 Jun 2018 12:17:00 GMT

     [ 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,, 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
> 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

View raw message