You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "aheev (via GitHub)" <gi...@apache.org> on 2025/09/03 15:57:48 UTC
Re: [PR] KAFKA-15038: Replace topicIdByPartitionMap with MetadataCache instance in RemoteLogManager [kafka]
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org