adixitconfluent commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2472567795
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -846,25 +851,35 @@ public ShareAcquiredRecords acquire(
inFlightBatch, groupId, topicIdPartition);
continue;
}
- // Schedule acquisition lock timeout for the batch.
- AcquisitionLockTimerTask acquisitionLockTimeoutTask =
scheduleAcquisitionLockTimeout(memberId, inFlightBatch.firstOffset(),
inFlightBatch.lastOffset());
- // Set the acquisition lock timeout task for the batch.
-
inFlightBatch.updateAcquisitionLockTimeout(acquisitionLockTimeoutTask);
+ long recordsToAcquiredCount = inFlightBatch.lastOffset() -
inFlightBatch.firstOffset() + 1;
+ int numRecordsRemaining = maxRecordsToAcquire - acquiredCount;
Review Comment:
I don't think you addressed the comment
https://github.com/apache/kafka/pull/20246/commits/8624ac5813d5881e523669b64c1b915ac09ca107#r2469546213,
the variable name should be `numRecordsToAcquire` as we discussed in the
comment thread
##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -136,6 +137,7 @@ class ReplicaManagerTest {
// Constants defined for readability
private val partitionEpoch = 0
private val brokerEpoch = 0L
+ private val batchOptimized = ShareAcquireMode.BATCH_OPTIMIZED.id();
Review Comment:
nit: Given we only have a single test related to share groups in this file,
I don't think we need a new variable for it, we can just use the value
`ShareAcquireMode.BATCH_OPTIMIZED.id()` in the test where it is needed.
--
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]