[ 
https://issues.apache.org/jira/browse/KAFKA-6877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466620#comment-16466620
 ] 

ASF GitHub Bot commented on KAFKA-6877:
---------------------------------------

efeg opened a new pull request #4974: KAFKA-6877; Remove completedFetch upon a 
failed parse if it contains no records.
URL: https://github.com/apache/kafka/pull/4974
 
 
   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 is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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)

Reply via email to