chia7712 commented on code in PR #17444:
URL: https://github.com/apache/kafka/pull/17444#discussion_r1821937479
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/Utils.java:
##########
@@ -235,4 +238,20 @@ public static ApiMessage
messageOrNull(ApiMessageAndVersion apiMessageAndVersion
return apiMessageAndVersion.message();
}
}
+
+ public static long hashSubscriptionMetadata(Map<String, TopicMetadata>
subscriptionMetadata) {
Review Comment:
@FrankYang0529 Please take a look at the above comment. We don’t need to
update the topic hash in onNewMetadataImage since lazy evaluation is more
efficient. Otherwise, we may waste computation if there are multiple metadata
events without any heartbeat events.
Additionally, we should evict the topic from the cache if the topic is
either changed or deleted. This ensures that the subsequent
computeSubscriptionTopicHash generates an up-to-date hash.
--
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]