apoorvmittal10 commented on code in PR #17322:
URL: https://github.com/apache/kafka/pull/17322#discussion_r1805394060
##########
core/src/main/java/kafka/server/share/SharePartitionManager.java:
##########
@@ -219,6 +227,7 @@ private SharePartitionManager(
this.delayedActionsQueue = delayedActionsQueue;
this.groupConfigManager = groupConfigManager;
this.shareGroupMetrics = new
ShareGroupMetrics(Objects.requireNonNull(metrics), time);
+ this.maxFetchRecords = shareFetchMaxFetchRecords;
Review Comment:
You are right, it's just that delayedPurgatory uses the same timer with lock
currently hence when I moved to `this` then it becomes hard. I ll do this
refactor when PR to move purgatory to replica manger is merged. This is on my
list.
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1058,36 +1084,57 @@ private void
maybeCompleteInitialization(CompletableFuture<Void> future) {
private AcquiredRecords acquireNewBatchRecords(
String memberId,
+ Iterable<? extends RecordBatch> batches,
long firstOffset,
- long lastOffset
+ long lastOffset,
+ int maxFetchRecords
) {
lock.writeLock().lock();
try {
+ // If same batch is fetched and previous batch is removed from the
cache then we need to
+ // update the batch first offset to endOffset, only if enfOffset
is passed the firstOffset.
Review Comment:
My bad, done.
--
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]