ijuma commented on a change in pull request #8979: URL: https://github.com/apache/kafka/pull/8979#discussion_r456074355
########## File path: clients/src/main/java/org/apache/kafka/common/protocol/Errors.java ########## @@ -139,13 +139,15 @@ InvalidFetchSizeException::new), LEADER_NOT_AVAILABLE(5, "There is no leader for this topic-partition as we are in the middle of a leadership election.", LeaderNotAvailableException::new), - NOT_LEADER_FOR_PARTITION(6, "This server is not the leader for that topic-partition.", - NotLeaderForPartitionException::new), + NOT_LEADER_OR_FOLLOWER(6, "For requests intended only for the leader, this error indicates that the broker is not the current leader. " + + "For requests intended for any replica, this error indicates that the broker is not a replica of the topic partition.", + NotLeaderOrFollowerException::new), REQUEST_TIMED_OUT(7, "The request timed out.", TimeoutException::new), BROKER_NOT_AVAILABLE(8, "The broker is not available.", BrokerNotAvailableException::new), - REPLICA_NOT_AVAILABLE(9, "The replica is not available for the requested topic-partition.", + REPLICA_NOT_AVAILABLE(9, "The replica is not available for the requested topic-partition. This is used for backward compatibility for " + Review comment: @hachikuji @rajinisivaram Since this is still used outside of produce/fetch, maybe the backwards compatibility message needs to be qualified? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org