Thanks for the feedback David Jacot

David Jacot wrote:
> I have one question regarding how fetch from followers will
> work when the leader is recovering. My understanding is that
> the leader will reject any produce and fetch requests with a
> NOT_LEADER_OR_FOLLOWER error while the followers
> will fence any fetch requests based on the incremented leader
> epoch. That seems OK for recent consumers from a correctness
> perspective but it might be a little weird for older consumers which
> do not set the leader epoch in the fetch request (prior to v9). They
> would be able to fetch from the followers while the leader recovers
> if I understand it correctly. It might be good to clarify this case in
> the KIP. What do you think?

The leader will return a NOT_LEADER_OR_FOLLOWER error on the FETCH
response if the leader is still recovering. This is true even if all
other FETCH requests validation success.

Looking at the history of the Errors type, the error
NOT_LEADER_OR_FOLLOWER(6) has always existed so all client versions
should be able to handle it:
https://github.com/apache/kafka/blob/fa6339c19cd06880d32ec9a5ee6b66e7f1488dcf/clients/src/main/java/org/apache/kafka/common/protocol/Errors.java#L35

Does that address your concern David?

Thanks
-José

Reply via email to