You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kevin Wu (Jira)" <ji...@apache.org> on 2026/04/21 19:12:00 UTC

[jira] [Updated] (KAFKA-20514) kraft observers should use previous fetch response to decide where to send the next fetch

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

Kevin Wu updated KAFKA-20514:
-----------------------------
    Description: 
Currently, the mechanism for backing off fetch requests determines where an observer sends its fetch requests (either to what it thinks is the leader, or to the bootstrap endpoints). Observers should consider the response from the previous fetch. For example, if the observer's fetch timeout expires, the observer should subsequently fetch from bootstrap servers, because it signifies being unable to successfully fetch from the leader. Alternatively, if the previous fetch to a bootstrap server fails with `NOT_LEADER_OR_FOLLOWER` and has a leader, the observer should subsequently fetch from the leader, rather than the bootstrap servers. This ensures the issue detailed in https://issues.apache.org/jira/browse/KAFKA-19354 does not happen.

This ensures that upon discovering the leader, an observer tries to fetch from it thereafter. Additionally, this ensures when the observer cannot fetch from the leader, it will fetch from the bootstrap servers to discover the leader.

> kraft observers should use previous fetch response to decide where to send the next fetch
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-20514
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20514
>             Project: Kafka
>          Issue Type: Bug
>          Components: kraft
>            Reporter: Kevin Wu
>            Assignee: Kevin Wu
>            Priority: Major
>
> Currently, the mechanism for backing off fetch requests determines where an observer sends its fetch requests (either to what it thinks is the leader, or to the bootstrap endpoints). Observers should consider the response from the previous fetch. For example, if the observer's fetch timeout expires, the observer should subsequently fetch from bootstrap servers, because it signifies being unable to successfully fetch from the leader. Alternatively, if the previous fetch to a bootstrap server fails with `NOT_LEADER_OR_FOLLOWER` and has a leader, the observer should subsequently fetch from the leader, rather than the bootstrap servers. This ensures the issue detailed in https://issues.apache.org/jira/browse/KAFKA-19354 does not happen.
> This ensures that upon discovering the leader, an observer tries to fetch from it thereafter. Additionally, this ensures when the observer cannot fetch from the leader, it will fetch from the bootstrap servers to discover the leader.



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