ijuma commented on a change in pull request #9758:
URL: https://github.com/apache/kafka/pull/9758#discussion_r552606639



##########
File path: core/src/main/scala/kafka/server/FetchSession.scala
##########
@@ -142,19 +141,20 @@ class CachedPartition(val topic: String,
       if (updateResponseData)
         localLogStartOffset = respData.logStartOffset
     }
-    if (respData.preferredReadReplica.isPresent) {
+    if (FetchResponse.preferredReadReplica(respData).isPresent) {

Review comment:
       Maybe we could have a isPreferredReplica method since there are at least 
two places where we just call isPresent on the result.




----------------------------------------------------------------
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


Reply via email to