You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jeff Kim (Jira)" <ji...@apache.org> on 2022/11/11 00:18:00 UTC
[jira] [Created] (KAFKA-14378) consumer should refresh preferred read replica on update metadata
Jeff Kim created KAFKA-14378:
--------------------------------
Summary: consumer should refresh preferred read replica on update metadata
Key: KAFKA-14378
URL: https://issues.apache.org/jira/browse/KAFKA-14378
Project: Kafka
Issue Type: Bug
Reporter: Jeff Kim
Assignee: Jeff Kim
The consumer (fetcher) refreshes the preferred read replica only on three conditions:
# the consumer receives an OFFSET_OUT_OF_RANGE error
# the follower does not exist in the client's metadata (i.e., offline)
# after metadata.max.age.ms (5 min default)
For other errors, it will continue to reach to the possibly unavailable follower and only after 5 minutes will it refresh the preferred read replica and go back to the leader.
A specific example is when a partition is reassigned. the consumer will get NOT_LEADER_OR_FOLLOWER which triggers a metadata update but the preferred read replica will not be refreshed as the follower is still online. it will continue to reach out to the old follower until the preferred read replica expires.
the consumer can instead refresh its preferred read replica whenever it makes a metadata update request. so when the consumer receives i.e. NOT_LEADER_OR_FOLLOWER it can find the new preferred read replica without waiting for the expiration.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)