apoorvmittal10 commented on code in PR #17539:
URL: https://github.com/apache/kafka/pull/17539#discussion_r1831062681


##########
core/src/main/java/kafka/server/share/SharePartitionManager.java:
##########
@@ -574,6 +575,7 @@ void processShareFetch(ShareFetchData shareFetchData) {
         // Initialize lazily, if required.
         Map<TopicIdPartition, Throwable> erroneous = null;
         Set<DelayedShareFetchKey> delayedShareFetchWatchKeys = new HashSet<>();
+        Map<TopicIdPartition, SharePartition> sharePartitions = new 
LinkedHashMap<>();

Review Comment:
   The reason I suggested to use LinkedHashMap was to maintain the fetch order 
of partitions.
   
   As per KIP - 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=255070434#KIP932:QueuesforKafka-Fetchingandacknowledgingrecords
   
   > In order to ensure no share-partitions are starved from records being 
fetched, the share-partition leader rotates the order of share-partitions for 
which it returns partition information. This ensures that it eventually returns 
data about all partitions for which data is available.
   
   I will add the rotation in SharePartitionManager to ensure the behaviour.



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