ShivsundarR commented on code in PR #20752:
URL: https://github.com/apache/kafka/pull/20752#discussion_r2459012672


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareCompletedFetch.java:
##########
@@ -99,10 +99,17 @@ public class ShareCompletedFetch {
     }
 
     private List<OffsetAndDeliveryCount> 
buildAcquiredRecordList(List<ShareFetchResponseData.AcquiredRecords> 
partitionAcquiredRecords) {
-        List<OffsetAndDeliveryCount> acquiredRecordList = new LinkedList<>();
+        List<OffsetAndDeliveryCount> acquiredRecordList = new ArrayList<>();

Review Comment:
   That makes sense, if most of the times the response is gonna contain only 1 
batch, we can avoid resizing. I have made the change. Thanks.



-- 
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]

Reply via email to