You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ahuang98 (via GitHub)" <gi...@apache.org> on 2025/07/07 23:09:29 UTC
Re: [PR] KAFKA-19122: updateClusterMetadata receives multiples PartitionInfo [kafka]
ahuang98 commented on code in PR #19803:
URL: https://github.com/apache/kafka/pull/19803#discussion_r2191147821
##########
metadata/src/main/java/org/apache/kafka/metadata/MetadataCache.java:
##########
@@ -148,56 +147,53 @@ DescribeTopicPartitionsResponseData describeTopicResponse(
boolean ignoreTopicsWithExceptions);
static Cluster toCluster(String clusterId, MetadataImage image) {
- Map<Integer, List<Node>> brokerToNodes = new HashMap<>();
- image.cluster().brokers().values().stream()
- .filter(broker -> !broker.fenced())
- .forEach(broker -> brokerToNodes.put(broker.id(), broker.nodes()));
+ Map<Integer, Node> nodesById = image.cluster().brokers().values().stream()
Review Comment:
why are we changing this from Map<Integer, List<node>> to Map<Integer, Node>? do we not lose information in PartitionInfo because of this?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org