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

Guozhang Wang commented on KAFKA-13621:
---------------------------------------

 [~jagsancio] Yes I think with KIP-835 we can augment this ticket from "resign 
after not receiving fetch request from majority within a timeout" to "resign 
after not receiving fetch request, AND not advancing the committed watermark 
after a timeout". To answer your question:

1) I think it could be in the controller model for now, since although it 
sounds to me as a general optimization not controller/metadata specific it does 
rely on the fact that we always have new appends periodically. We can consider 
moving it into raft after we've experimented for a while and even use the 
protocol for data partitions in the future.
2) If we make the resign condition as above (i.e. both needs to be true) then I 
think this is fine?

> Resign leader on network partition
> ----------------------------------
>
>                 Key: KAFKA-13621
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13621
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: Jose Armando Garcia Sancio
>            Priority: Major
>
> h1. Motivation
> If the current leader A at epoch X gets partition from the rest of the 
> quorum, quorum voter A will stay leader at epoch X. This happens because 
> voter A will never receive an request from the rest of the voters increasing 
> the epoch. These requests that typically increase the epoch of past leaders 
> are BeginQuorumEpoch and Vote.
> In addition if voter A (leader at epoch X) doesn't get partition from the 
> rest of the brokers (observer in the KRaft protocol) the brokers will never 
> learn about the new quorum leader. This happens because 1. observers learn 
> about the leader from the Fetch response and 2. observer send a Fetch request 
> to a random leader if the Fetch request times out.
> Neither of these two scenarios will cause the broker to send a request to a 
> different voter because the leader at epoch X will never send a different 
> leader in the response and the broker will never send a Fetch request to a 
> different voter because the Fetch request will never timeout.
> h1. Proposed Changes
> In this scenario the A, the leader at epoch X, will stop receiving Fetch 
> request from the majority of the voters. Voter A should resign as leader if 
> the Fetch request from the majority of the voters is old enough. A reasonable 
> value for "old enough" is the Fetch timeout value.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to