aheev commented on code in PR #20256:
URL: https://github.com/apache/kafka/pull/20256#discussion_r2319418482


##########
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManager.java:
##########
@@ -490,8 +479,8 @@ public void onLeadershipChange(Set<TopicPartitionLog> 
partitionsBecomeLeader,
     public void stopLeaderCopyRLMTasks(Set<TopicPartitionLog> partitions) {
         for (TopicPartitionLog partition : partitions) {
             TopicPartition tp = partition.topicPartition();
-            if (topicIdByPartitionMap.containsKey(tp)) {
-                TopicIdPartition tpId = new 
TopicIdPartition(topicIdByPartitionMap.get(tp), tp);
+            if (metadataCache.contains(tp)) {

Review Comment:
   Yes. Any ETA for when that would be introduced? If there a parent ticket, I 
can create a sub-ticket for Remote storage components under it



##########
core/src/main/scala/kafka/server/ConfigHandler.scala:
##########
@@ -90,12 +90,14 @@ class TopicConfigHandler(private val replicaManager: 
ReplicaManager,
       val stopPartitions: java.util.HashSet[StopPartition] = new 
java.util.HashSet[StopPartition]()
       leaderPartitions.foreach(partition => {
         // delete remote logs and stop RemoteLogMetadataManager
-        stopPartitions.add(new StopPartition(partition.topicPartition, false, 
true, true))
+        stopPartitions.add(
+          new StopPartition(new TopicIdPartition(partition.topicId.get, 
partition.topicPartition), false, true, true))

Review Comment:
   Also, in future, TopicIdPartition would be added in TopicPartitionLog right?



##########
core/src/main/scala/kafka/server/ConfigHandler.scala:
##########
@@ -90,12 +90,14 @@ class TopicConfigHandler(private val replicaManager: 
ReplicaManager,
       val stopPartitions: java.util.HashSet[StopPartition] = new 
java.util.HashSet[StopPartition]()
       leaderPartitions.foreach(partition => {
         // delete remote logs and stop RemoteLogMetadataManager
-        stopPartitions.add(new StopPartition(partition.topicPartition, false, 
true, true))
+        stopPartitions.add(
+          new StopPartition(new TopicIdPartition(partition.topicId.get, 
partition.topicPartition), false, true, true))

Review Comment:
   Curious. When do we get an empty topicId?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to