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



##########
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:
       All the information that is needed is already here.

##########
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:
       All the information that is needed is already here. If you delete X 
partitions that had a leader of -1, you decrement the counter by X.




-- 
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:
us...@infra.apache.org


Reply via email to