apoorvmittal10 commented on code in PR #23951:
URL: https://github.com/apache/kafka/pull/23951#discussion_r4376519414
##########
server/src/main/java/org/apache/kafka/server/share/context/ShareSessionContext.java:
##########
@@ -215,6 +212,42 @@ public ShareFetchResponse
updateAndGenerateResponseData(String groupId, String m
}
}
+ /**
+ * Re-orders the partitions of the session as per the records returned in
the response. The subsequent
+ * fetch reads the partitions in the order of the session, hence the
partitions which returned records
+ * are moved to the end so the partitions which did not return records are
read first. Among the partitions
+ * which returned records, the partition read first takes the largest
share of the records, hence they are
+ * appended in the order decided by the {@link PartitionRotateStrategy} so
the first position rotates.
+ * <p>
+ * The updates are expected in the fetch order of the partitions.
+ *
+ * @param updates The response data for the partitions, in fetch order.
+ */
+ private void updatePartitionOrder(LinkedHashMap<TopicIdPartition,
ShareFetchResponseData.PartitionData> updates) {
Review Comment:
Agree but this is just a consequence of ordering but not true starvation.
Something where lag aware assignors will be helpful in future.
--
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]