TaiJuWu opened a new pull request, #24136: URL: https://github.com/apache/kafka/pull/24136
When the log dir of a partition leader fails, the broker keeps running and returns `KAFKA_STORAGE_ERROR`, and the leadership moves to another broker. A share consumer keeps fetching from the old leader, because it uses its cached leader rather than the leader in the metadata, and the cache is only replaced on `NOT_LEADER_OR_FOLLOWER` and `FENCED_LEADER_EPOCH`. This PR removes the cached leader on all the errors for which the share fetch collector requests a metadata update, unless the response carries the new leader, so that the next fetch uses the leader in the metadata. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
