jolshan commented on code in PR #13231:
URL: https://github.com/apache/kafka/pull/13231#discussion_r1107744819
##########
clients/src/main/java/org/apache/kafka/common/requests/AddPartitionsToTxnRequest.java:
##########
@@ -35,21 +44,43 @@ public class AddPartitionsToTxnRequest extends
AbstractRequest {
private final AddPartitionsToTxnRequestData data;
private List<TopicPartition> cachedPartitions = null;
+
+ private Map<String, List<TopicPartition>> cachedPartitionsByTransaction =
null;
+
+ private final short version;
public static class Builder extends
AbstractRequest.Builder<AddPartitionsToTxnRequest> {
public final AddPartitionsToTxnRequestData data;
+ public final boolean isClientRequest;
- public Builder(final AddPartitionsToTxnRequestData data) {
+ // Only used for versions < 4
Review Comment:
Maybe Jason's suggestion below will help -- using factory methods.
I'm not sure there is any way to "enforce" but to guide folks to use the
right methods
--
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]