chia7712 commented on code in PR #22795:
URL: https://github.com/apache/kafka/pull/22795#discussion_r3553133030
##########
core/src/main/java/kafka/server/share/ReplicaManagerLogReader.java:
##########
@@ -162,6 +121,47 @@ public CompletableFuture<LinkedHashMap<TopicIdPartition,
LogReadResult>> readAsy
});
}
+ // Visible for testing
+ LinkedHashMap<TopicIdPartition, LogReadResult> read(
+ FetchParams fetchParams,
+ Set<TopicIdPartition> partitionsToFetch,
Review Comment:
Just out of curiosity: The iteration order seems to be determined by
partitionsToFetch, but its type is a plain `Set`, meaning no order guarantee.
By contrast, the usages of `partitionMaxBytes` and `topicPartitionFetchOffsets`
don't seem to require order guarantees, but they are typed as `LinkedHashMap`.
@apoorvmittal10 Would you mind sharing the rationale behind these type
choices? 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]