JimmyWang6 commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2485596259
##########
clients/src/main/java/org/apache/kafka/common/requests/ShareFetchRequest.java:
##########
@@ -61,6 +61,7 @@ public static Builder forConsumer(String groupId,
ShareRequestMetadata metadata,
data.setMaxBytes(maxBytes);
data.setMaxRecords(maxRecords);
data.setBatchSize(batchSize);
+ data.setShareAcquireMode(shareAcquireMode);
Review Comment:
Finish, changed like this:
```java
if (version < 2) {
// The v1 does not support AcknowledgeType RENEW.
if (data.isRenewAck()) {
throw new UnsupportedVersionException("The v1 ShareFetch does not
support AcknowledgeType.RENEW");
}
// The v1 does not support ShareAcquireMode record_limit.
if (data.shareAcquireMode() == ShareAcquireMode.RECORD_LIMIT.id()) {
throw new UnsupportedVersionException("The v1 ShareFetch does not
support ShareAcquireMode.RECORD_LIMIT");
}
}
```
##########
clients/src/main/java/org/apache/kafka/common/requests/ShareFetchRequest.java:
##########
@@ -61,6 +61,7 @@ public static Builder forConsumer(String groupId,
ShareRequestMetadata metadata,
data.setMaxBytes(maxBytes);
data.setMaxRecords(maxRecords);
data.setBatchSize(batchSize);
+ data.setShareAcquireMode(shareAcquireMode);
Review Comment:
Finished, changed like this:
```java
if (version < 2) {
// The v1 does not support AcknowledgeType RENEW.
if (data.isRenewAck()) {
throw new UnsupportedVersionException("The v1 ShareFetch does not
support AcknowledgeType.RENEW");
}
// The v1 does not support ShareAcquireMode record_limit.
if (data.shareAcquireMode() == ShareAcquireMode.RECORD_LIMIT.id()) {
throw new UnsupportedVersionException("The v1 ShareFetch does not
support ShareAcquireMode.RECORD_LIMIT");
}
}
```
--
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]