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/02/02 15:55:46 UTC

[GitHub] [kafka] rondagostino commented on a change in pull request #10003: MINOR: Add HostedPartition.Deferred state in ReplicaManager

rondagostino commented on a change in pull request #10003:
URL: https://github.com/apache/kafka/pull/10003#discussion_r568716273



##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -316,7 +324,7 @@ class ReplicaManager(val config: KafkaConfig,
   private def maybeRemoveTopicMetrics(topic: String): Unit = {
     val topicHasOnlinePartition = allPartitions.values.exists {
       case HostedPartition.Online(partition) => topic == partition.topic
-      case HostedPartition.None | HostedPartition.Offline => false
+      case _ => false

Review comment:
       > a sealed trait with def partition: Partition
   
   I like this solution better than making everything a case class with an `Option[Partition]`.  Will push a commit with it shortly.
   




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