apoorvmittal10 commented on code in PR #18804:
URL: https://github.com/apache/kafka/pull/18804#discussion_r1946804279
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -678,6 +680,9 @@ public ShareAcquiredRecords acquire(
for (Map.Entry<Long, InFlightBatch> entry : subMap.entrySet()) {
// If the acquired count is equal to the max fetch records
then break the loop.
if (acquiredCount >= maxFetchRecords) {
+ // If the limit to acquire records is reached then it
means there exists additional
+ // fetch batches which cannot be acquired.
+ subsetAcquired = true;
Review Comment:
Yeah, agree. Maintaining the subset boolean is harder than just iterating
and verifying.
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -678,6 +680,9 @@ public ShareAcquiredRecords acquire(
for (Map.Entry<Long, InFlightBatch> entry : subMap.entrySet()) {
// If the acquired count is equal to the max fetch records
then break the loop.
if (acquiredCount >= maxFetchRecords) {
+ // If the limit to acquire records is reached then it
means there exists additional
+ // fetch batches which cannot be acquired.
+ subsetAcquired = true;
Review Comment:
Yeah, agree. Mantaining the subset boolean is harder than just iterating and
verifying.
--
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]