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

kangning.li commented on KAFKA-17804:
-------------------------------------

My previous understanding had some errors; the correct situation should be as 
follows:



If a leader repica receive a fetch request which is from consumer and 
"client.rack" is set, then leader repica put it to purgatory. After that, the 
leader becomes a follower replica, but the fetch request in the purgatory will 
not be interrupted.

> optimize ReplicaManager.completeDelayedOperationsWhenNotPartitionLeader
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-17804
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17804
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jun Rao
>            Assignee: kangning.li
>            Priority: Minor
>
> Currently, ReplicaManager.completeDelayedOperationsWhenNotPartitionLeader is 
> called when (1) a replica is removed from the broker and (2) a replica 
> becomes a follower replica and it checks the completion of multiple 
> purgatories.  However, not all purgatories need to be checked in both 
> situations. For example, the fetch purgatory doesn't need to be checked in 
> case (2) since we support fetch from follower now. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to