AndrewJSchofield commented on code in PR #20826:
URL: https://github.com/apache/kafka/pull/20826#discussion_r2491389504


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -4011,7 +4009,7 @@ class KafkaApis(val requestChannel: RequestChannel,
             erroneous += tp -> ShareAcknowledgeResponse.partitionResponse(tp, 
Errors.INVALID_REQUEST)
             erroneousTopicIdPartitions.add(tp)
             isErroneous = true
-          } else if (batch.acknowledgeTypes.stream().anyMatch(ackType => 
ackType < 0 || ackType > 3)) {
+          } else if (batch.acknowledgeTypes.stream().anyMatch(ackType => 
ackType < 0 || ackType > 4)) {

Review Comment:
   Personally, I would add a pair of parameters, one which indicates whether 
the request is permitted to use `RENEW` (so version >= 2), and another to 
indicate whether the request actually has `isRenewAck` set. If the request 
version is >= 2, then the max ack type is 4, else 3. If `isRenewAck` is not 
set, the `ackType` must not be 4.



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