AndrewJSchofield commented on code in PR #20752:
URL: https://github.com/apache/kafka/pull/20752#discussion_r2454582774
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareCompletedFetch.java:
##########
@@ -100,9 +100,16 @@ public class ShareCompletedFetch {
private List<OffsetAndDeliveryCount>
buildAcquiredRecordList(List<ShareFetchResponseData.AcquiredRecords>
partitionAcquiredRecords) {
List<OffsetAndDeliveryCount> acquiredRecordList = new LinkedList<>();
+ // Set to find duplicates in case of overlapping acquired records
+ Set<Long> offsets = new HashSet<>();
Review Comment:
I wonder if you could change the `partitionAcquiredRecords` into a
`LinkedHashMap` or similar to combine the duplicate checking with the ordered
iteration.
--
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]