JimmyWang6 commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2449204576
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1596,9 +1628,45 @@ private ShareAcquiredRecords acquireNewBatchRecords(
}
}
+ private AcquiredRecords filterShareAcquiredRecordsInRecordLimitMode(int
maxFetchRecords, List<AcquiredRecords> acquiredRecords) {
+ // Only acquire one single batch in record limit mode.
+ AcquiredRecords records = acquiredRecords.get(0);
+ InFlightBatch inFlightBatch = cachedState.get(records.firstOffset());
+ long lastOffset = records.firstOffset() + maxFetchRecords - 1;
+ if (inFlightBatch != null) {
Review Comment:
Good catch, I'll address it.
--
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]