chia7712 commented on code in PR #20737:
URL: https://github.com/apache/kafka/pull/20737#discussion_r2483974740
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java:
##########
@@ -815,21 +816,26 @@ private void handleShareFetchSuccess(Node fetchTarget,
}
}
- ShareCompletedFetch completedFetch = new ShareCompletedFetch(
+ completedFetches.add(
+ new ShareCompletedFetch(
logContext,
BufferSupplier.create(),
fetchTarget.id(),
tip,
partitionData,
shareFetchMetricsAggregator,
- requestVersion);
- shareFetchBuffer.add(completedFetch);
+ requestVersion)
+ );
if (!partitionData.acquiredRecords().isEmpty()) {
fetchMoreRecords = false;
}
}
+ if (!completedFetches.isEmpty()) {
+ shareFetchBuffer.add(completedFetches);
Review Comment:
Is this primarily a performance optimization for handling many partitions?
If so, should we reduce the `ShareAcknowledgementCommitCallbackEvent` by
batching partitions ?
--
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]