JimmyWang6 commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2449247007


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -817,9 +832,13 @@ public ShareAcquiredRecords acquire(
                     // Do not send max fetch records to 
acquireSubsetBatchRecords as we want to acquire
                     // all the records from the batch as the batch will anyway 
be part of the file-records
                     // response batch.
-                    int acquiredSubsetCount = 
acquireSubsetBatchRecords(memberId, firstBatch.baseOffset(), 
lastOffsetToAcquire, inFlightBatch, result);
+                    int acquiredSubsetCount = 
acquireSubsetBatchRecords(memberId, isRecordLimitMode, maxFetchRecords, 
firstBatch.baseOffset(), lastOffsetToAcquire, inFlightBatch, result);
                     acquiredCount += acquiredSubsetCount;
-                    continue;
+                    if (isRecordLimitMode) {

Review Comment:
   The initial purpose here was that in `record_limit` mode, only a single 
batch would be returned in ShareAcquiredRecords. But after reconsidering, I 
think you are right and this code could be removed.



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