Hangleton commented on code in PR #13323:
URL: https://github.com/apache/kafka/pull/13323#discussion_r1132839586


##########
clients/src/main/java/org/apache/kafka/common/requests/FetchRequest.java:
##########
@@ -144,18 +146,28 @@ public static class Builder extends 
AbstractRequest.Builder<FetchRequest> {
 
         public static Builder forConsumer(short maxVersion, int maxWait, int 
minBytes, Map<TopicPartition, PartitionData> fetchData) {
             return new Builder(ApiKeys.FETCH.oldestVersion(), maxVersion,
-                CONSUMER_REPLICA_ID, maxWait, minBytes, fetchData);
+                CONSUMER_REPLICA_ID,  -1, maxWait, minBytes, fetchData);
         }
 
-        public static Builder forReplica(short allowedVersion, int replicaId, 
int maxWait, int minBytes,
+        public static Builder forReplica(short allowedVersion, int replicaId, 
long replicaEpoch, int maxWait, int minBytes,
                                          Map<TopicPartition, PartitionData> 
fetchData) {
-            return new Builder(allowedVersion, allowedVersion, replicaId, 
maxWait, minBytes, fetchData);
+            return new Builder(allowedVersion, allowedVersion, replicaId, 
replicaEpoch, maxWait, minBytes, fetchData);
         }
 
-        public Builder(short minVersion, short maxVersion, int replicaId, int 
maxWait, int minBytes,
+        public Builder(short minVersion, short maxVersion, int replicaId, long 
replicaEpoch, int maxWait, int minBytes,
                        Map<TopicPartition, PartitionData> fetchData) {
             super(ApiKeys.FETCH, minVersion, maxVersion);
             this.replicaId = replicaId;
+            this.replicaEpoch = replicaEpoch;
+            this.maxWait = maxWait;
+            this.minBytes = minBytes;
+            this.toFetch = fetchData;
+        }
+        public Builder(short minVersion, short maxVersion, int replicaId, int 
maxWait, int minBytes,

Review Comment:
   I must be missing something, but isn't this constructor and the one above 
line 157 the same (that is only differing in the order of definition of their 
arguments)? Is this overload intended?



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