CalvinConfluent commented on code in PR #19590:
URL: https://github.com/apache/kafka/pull/19590#discussion_r2069651007


##########
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetricsChanges.java:
##########
@@ -105,10 +114,25 @@ void handleTopicChange(TopicImage prev, TopicDelta 
topicDelta) {
         } else {
             for (Entry<Integer, PartitionRegistration> entry : 
topicDelta.partitionChanges().entrySet()) {
                 int partitionId = entry.getKey();
+                PartitionRegistration prevPartition = 
prev.partitions().get(partitionId);
                 PartitionRegistration nextPartition = entry.getValue();
-                handlePartitionChange(prev.partitions().get(partitionId), 
nextPartition);
+                handlePartitionChange(prevPartition, nextPartition);
+
+                // Though we don't know if there is an unclean leader 
election/ELR election happened in the very beginning

Review Comment:
   Thanks, removed this part.



-- 
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

Reply via email to