[ 
https://issues.apache.org/jira/browse/KAFKA-15038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17749158#comment-17749158
 ] 

Divij Vaidya commented on KAFKA-15038:
--------------------------------------

Hi [~owen-leung] 

Than you for looking into this. Yes, we want to replace 
*ConcurrentMap<TopicPartition, Uuid> topicPartitionIds* cache in 
RemoteLogManager. However, instead we want to cache available in every broker 
called the Metadata cache [1]which will be the single source of authority on a 
broker about topicId <-> topicName mapping. This cache is updated 
asynchronously on every broker. 

[1] 
[https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/MetadataCache.scala]
 

> Use topic id/name mapping from the Metadata cache in the RemoteLogManager
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-15038
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15038
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Alexandre Dupriez
>            Assignee: Owen C.H. Leung
>            Priority: Minor
>
> Currently, the {{RemoteLogManager}} maintains its own cache of topic name to 
> topic id 
> [[1]|https://github.com/apache/kafka/blob/trunk/core/src/main/java/kafka/log/remote/RemoteLogManager.java#L138]
>  using the information provided during leadership changes, and removing the 
> mapping upon receiving the notification of partition stopped.
> It should be possible to re-use the mapping in a broker's metadata cache, 
> removing the need for the RLM to build and update a local cache thereby 
> duplicating the information in the metadata cache. It also allows to preserve 
> a single source of authority regarding the association between topic names 
> and ids.
> [1] 
> https://github.com/apache/kafka/blob/trunk/core/src/main/java/kafka/log/remote/RemoteLogManager.java#L138



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to