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

Jason Gustafson updated KAFKA-9004:
-----------------------------------
    Summary: Fetch from follower unintentionally allowed for old consumers  
(was: Fetch from follower unintentionally enabled for old consumers)

> Fetch from follower unintentionally allowed for old consumers
> -------------------------------------------------------------
>
>                 Key: KAFKA-9004
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9004
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>            Assignee: David Arthur
>            Priority: Major
>
> With KIP-392, we allow consumers to fetch from followers. This capability is 
> enabled when a replica selector has been provided in the configuration. When 
> not in use, the intent is to preserve current behavior of fetching only from 
> leader. The leader epoch is the mechanism that keeps us honest. When there is 
> a leader change, the epoch gets bumped, consumer fetches fail due to the 
> fenced epoch, and we find the new leader.
> However, for old consumers, there is no similar protection. The leader epoch 
> was not available to clients until recently. If there is a preferred leader 
> election (for example), the old consumer will happily continue fetching from 
> the demoted leader until a periodic metadata fetch causes us to discover the 
> new leader. This does not create any problems from a correctness 
> perspective–fetches are still bound by the high watermark–but it is 
> unexpected and may cause unexpected performance characteristics.
> To fix this (assuming we think it should be fixed), we could be stricter 
> about fetches and require the leader check if the fetch request has no epoch. 
> Or maybe just require the leader check for older versions of the fetch 
> request.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to