You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2025/10/06 15:40:02 UTC
Re: [PR] KAFKA-14274 [2-5/7]: Introduction of more infrastructure for forthcoming fetch request manager [kafka]
chia7712 commented on PR #14359:
URL: https://github.com/apache/kafka/pull/14359#issuecomment-3372367774
```
// Return all partitions that are in an otherwise fetchable state *and* for which we don't already have some
// messages sitting in our buffer.
return new HashSet<>(subscriptions.fetchablePartitions(isNotBuffered));
```
Out of curiosity, why are they being copied into a new `Set` collection? The `ShareConsumeRequestManager` directly use the `List` type without an extra deep copy. Also, the elements returned by `subscriptions.fetchablePartitions` should already be deduplicated.
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java#L1076
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org