chia7712 commented on a change in pull request #9689: URL: https://github.com/apache/kafka/pull/9689#discussion_r542386056
########## File path: clients/src/main/java/org/apache/kafka/common/requests/RequestUtils.java ########## @@ -34,7 +34,7 @@ private RequestUtils() {} - static Optional<Integer> getLeaderEpoch(int leaderEpoch) { + public static Optional<Integer> getLeaderEpoch(int leaderEpoch) { Review comment: There are some duplicate code. Maybe we can unify them in this PR (or we can address it in follow-up) ? 1. https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L1399 2. https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L1553 3. https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/FileRecords.java#L358 4. https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala#L1124 5. https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/KafkaApis.scala#L534 6. https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/ReplicaManager.scala#L1890 ---------------------------------------------------------------- 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