FrankYang0529 commented on code in PR #17444:
URL: https://github.com/apache/kafka/pull/17444#discussion_r1817615221
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/TopicMetadata.java:
##########
@@ -41,10 +41,25 @@ public class TopicMetadata {
*/
private final int numPartitions;
+ /**
+ * Map of every partition Id to a set of its rack Ids, if they exist.
+ * If rack information is unavailable for all partitions, this is an empty
map.
+ */
+ private final Map<Integer, Set<String>> partitionRacks;
Review Comment:
Hi @chia7712, thanks for the suggestion. With this way, we still need to
store `subscriptionMetadata` in `__consumer_offsets`, or we can't get an old
value to compare with new calculated value.
I have a rough idea. How about we always calculate new target assignment
when the metadata is expired? If latest target assignment is not equal to the
old one, we bump group epoch. With this way, we can avoid bumping useless group
epoch. Also, we don't store `subscriptionMetadata` in records.
--
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]