FrankYang0529 commented on code in PR #19802: URL: https://github.com/apache/kafka/pull/19802#discussion_r2107522589
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java: ########## @@ -582,54 +592,44 @@ public Set<String> currentWarmupTaskProcessIds( } /** - * @return An immutable map of partition metadata for each topic that are inputs for this streams group. + * @return The metadata hash. */ - public Map<String, TopicMetadata> partitionMetadata() { - return Collections.unmodifiableMap(partitionMetadata); + public long metadataHash() { + return metadataHash.get(); } /** - * Updates the partition metadata. This replaces the previous one. + * Updates the metadata hash. * - * @param partitionMetadata The new partition metadata. + * @param metadataHash The new metadata hash. */ - public void setPartitionMetadata( - Map<String, TopicMetadata> partitionMetadata - ) { - this.partitionMetadata.clear(); - this.partitionMetadata.putAll(partitionMetadata); - maybeUpdateConfiguredTopology(); - maybeUpdateGroupState(); Review Comment: We may not be able to set metadata hash in `ConfiguredTopology`. When replaying `StreamsGroupMetadataValue`, we need to set `metadataHash` back. If we add it to `ConfiguredTopology`, that means there will have a non-empty `ConfiguredTopology` in the group and the `metadataHash` may be the same as latest computed value. Then we don't have a value to compare whether need to compute a new `ConfiguredTopology`. -- 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