You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/11/29 17:19:59 UTC

[GitHub] [kafka] jeffkbkim commented on a diff in pull request #12897: KAFKA-14379: consumer should refresh preferred read replica on update metadata

jeffkbkim commented on code in PR #12897:
URL: https://github.com/apache/kafka/pull/12897#discussion_r1035045272


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java:
##########
@@ -346,8 +346,10 @@ public void onFailure(RuntimeException e) {
                             FetchSessionHandler handler = sessionHandler(fetchTarget.id());
                             if (handler != null) {
                                 handler.handleError(e);
+                                handler.sessionTopicPartitions().forEach(subscriptions::clearPreferredReadReplica);
                             }
                         } finally {
+                            metadata.requestUpdate();

Review Comment:
   i did look at the code path but did not validate via a network client, thanks for the find!



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org