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


##########
clients/src/main/resources/common/message/FetchRequest.json:
##########
@@ -100,7 +102,9 @@
         { "name": "LogStartOffset", "type": "int64", "versions": "5+", 
"default": "-1", "ignorable": true,
           "about": "The earliest available offset of the follower replica.  
The field is only used when the request is sent by the follower."},
         { "name": "PartitionMaxBytes", "type": "int32", "versions": "0+",
-          "about": "The maximum bytes to fetch from this partition.  See 
KIP-74 for cases where this limit may not be honored." }
+          "about": "The maximum bytes to fetch from this partition.  See 
KIP-74 for cases where this limit may not be honored." },
+        { "name": "ReplicaDirectoryId", "type": "uuid", "versions": "17+", 
"taggedVersions": "17+", "tag": 0,

Review Comment:
   > I guess that is slightly different. We should always be able to write a 
request for a lower version.
   
   yep, that is different. The case we discuss is "KafkaRaftClient" . IMHO, we 
should update the request if the version is <17. for example:
   ```java
               if (version < 17) {
                   fetchRequestData.topics()
                       .forEach(t -> t.partitions()
                       .forEach(p -> p.setReplicaDirectoryId(Uuid.ZERO_UUID)));
               }
   ```
   
   
https://github.com/apache/kafka/blob/5596f9e1d561dfef46a83fbd7264e6745ca538cc/clients/src/main/java/org/apache/kafka/common/requests/FetchRequest.java#L142



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to