chia7712 commented on code in PR #24320:
URL: https://github.com/apache/kafka/pull/24320#discussion_r4680866350
##########
metadata/src/main/java/org/apache/kafka/image/TopicDelta.java:
##########
@@ -180,6 +222,12 @@ public LocalReplicaChanges localChanges(int brokerId) {
Map<TopicPartition, LocalReplicaChanges.PartitionInfo> followers = new
HashMap<>();
Map<String, Uuid> topicIds = new HashMap<>();
Map<TopicIdPartition, Uuid> directoryIds = new HashMap<>();
+ Map<Uuid, LocalReplicaChanges.MirrorTopicState> mirrorTopicChanges =
new HashMap<>();
+
+ LocalReplicaChanges.MirrorTopicState mirrorTopicState =
mirrorTopicStateChange(image);
Review Comment:
I assume `LocalReplicaChanges` is used to search the changes related to this
node, but `mirrorTopicChanges` is not filtered by `brokerId`, so it seems to
include the mirror topics of the whole cluster. Maybe we could expose
`Map<Uuid, Optional<TopicImage.Mirror>>` on `TopicsDelta` instead? Also,
`MirrorTopicState` has only one field, so is it a bit redundant?
--
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]