adixitconfluent commented on code in PR #19148: URL: https://github.com/apache/kafka/pull/19148#discussion_r1985179562
########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -3139,15 +3135,15 @@ class KafkaApis(val requestChannel: RequestChannel, val erroneous = mutable.Map.empty[TopicIdPartition, ShareFetchResponseData.PartitionData] erroneousAndValidPartitionData.erroneous.forEach { (topicIdPartition, partitionData) => erroneous.put(topicIdPartition, partitionData) } - val interestedWithMaxBytes = new util.LinkedHashMap[TopicIdPartition, Integer] + val interestedTopicPartitions = new util.LinkedHashSet[TopicIdPartition] Review Comment: We'll have to use `TopicIdPartition` as the element type of `ImplicitLinkedHashCollection`, and to do that we'll have to make `TopicIdPartition` implement `ImplicitLinkedHashCollection.Element` which doesn't look ideal. Between ArrayList and LinkedList, I am thinking to use ArrayList because it is better in storing the data and accessing it. It takes lesser memory. Although its insertion and deletion operations are not that efficient, we do not use delete operation anywhere in the code as such and insertion is much rare compared to accessing the list. Please let me know if we can finalize ArrayList. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org