You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/14 23:25:12 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #10572: KAFKA-12697: Add OfflinePartitionCount and PreferredReplicaImbalanceCount metrics to Quorum Controller

cmccabe commented on a change in pull request #10572:
URL: https://github.com/apache/kafka/pull/10572#discussion_r632857030



##########
File path: metadata/src/main/java/org/apache/kafka/controller/BrokersToIsrs.java
##########
@@ -139,10 +140,16 @@ public TopicIdPartition next() {
      * Partitions with no isr members appear in this map under id NO_LEADER.
      */
     private final TimelineHashMap<Integer, TimelineHashMap<Uuid, int[]>> isrMembers;
+    
+    private final Map<Uuid, Integer> offlinePartitionCounts;

Review comment:
       We cannot use regular maps here because they will not roll back to the desired state during a snapshot restore.
   
   In any case, I don't see why we need this map.  It's enough to know how many offline partitions there are, which we already have a count of below.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org