FrankYang0529 commented on code in PR #19761: URL: https://github.com/apache/kafka/pull/19761#discussion_r2096090102
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/Utils.java: ########## @@ -349,12 +349,19 @@ static void throwIfRegularExpressionIsInvalid( * @return The hash of the group. */ static long computeGroupHash(Map<String, Long> topicHashes) { - if (topicHashes.isEmpty()) { + // Sort entries by topic name + List<Map.Entry<String, Long>> sortedEntries = new ArrayList<>(); + for (Map.Entry<String, Long> entry : topicHashes.entrySet()) { + // Filter out entries with a hash value of 0, which indicates no topic + if (entry.getValue() != 0) { Review Comment: Ignore topic hash 0 because it indicates the topic is not existent. We also do this in previous implementation. https://github.com/apache/kafka/blob/cff10e654149ed2d4924235a15156d4bc0bf7b4a/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/ModernGroup.java#L387-L396 -- 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