showuon commented on code in PR #15522:
URL: https://github.com/apache/kafka/pull/15522#discussion_r1546066080


##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -624,6 +624,13 @@ class ReplicaManager(val config: KafkaConfig,
     errorMap
   }
 
+  def topicNameFromId(topicId: Uuid): Option[String] =
+    allPartitions.values.flatMap {
+      case HostedPartition.Offline(Some(partition)) if 
partition.topicId.contains(topicId) => Some(partition.topic)
+      case Online(partition) if partition.topicId.contains(topicId) => 
Some(partition.topic)
+      case _ => None
+    }.headOption

Review Comment:
   What's this for?



##########
core/src/main/scala/kafka/server/ReplicaAlterLogDirsThread.scala:
##########
@@ -105,7 +105,7 @@ class ReplicaAlterLogDirsThread(name: String,
       topicId <- partition.topicId
       directoryId <- partition.logDirectoryId()
       topicIdPartition = new TopicIdPartition(topicId, 
topicPartition.partition())
-    } directoryEventHandler.handleAssignment(topicIdPartition, directoryId, () 
=> ())
+    } directoryEventHandler.handleAssignment(topicIdPartition, directoryId, 
"Reverting queued dir reassignment mid future replica promotion", () => ())

Review Comment:
   What does "mid future" mean here? 



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