chia7712 commented on code in PR #16876:
URL: https://github.com/apache/kafka/pull/16876#discussion_r1718852127


##########
clients/src/main/java/org/apache/kafka/common/requests/ListOffsetsRequest.java:
##########
@@ -95,13 +96,33 @@ public Builder setTargetTimes(List<ListOffsetsTopic> 
topics) {
 
         @Override
         public ListOffsetsRequest build(short version) {
+            for (ListOffsetsTopic topic : data.topics()) {
+                for (ListOffsetsPartition partition : topic.partitions()) {
+                    checkVersion(version, topic.name(), partition);

Review Comment:
   @frankvicky What we want to protect is the request from clients (admin and 
consumer). So maybe we should revise `fromConsumer`[0] rather than `build`.
   
   WDYT?
   
   [0] 
https://github.com/apache/kafka/blob/21dd5cd421139d6134d738d6e7555f0db6e1f622/clients/src/main/java/org/apache/kafka/common/requests/ListOffsetsRequest.java#L65



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to