dajac commented on a change in pull request #9626: URL: https://github.com/apache/kafka/pull/9626#discussion_r540322639
########## File path: core/src/main/scala/kafka/controller/KafkaController.scala ########## @@ -1378,12 +1378,26 @@ class KafkaController(val config: KafkaConfig, val offlineReplicas = new ArrayBuffer[TopicPartition]() val onlineReplicas = new ArrayBuffer[TopicPartition]() - leaderAndIsrResponse.partitions.forEach { partition => - val tp = new TopicPartition(partition.topicName, partition.partitionIndex) - if (partition.errorCode == Errors.KAFKA_STORAGE_ERROR.code) - offlineReplicas += tp - else if (partition.errorCode == Errors.NONE.code) - onlineReplicas += tp + if (leaderAndIsrResponse.topics().isEmpty) { Review comment: Actually, this may not work as we don't have the topic name in the latest version... ---------------------------------------------------------------- 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