hachikuji commented on a change in pull request #11004:
URL: https://github.com/apache/kafka/pull/11004#discussion_r745899287



##########
File path: clients/src/main/java/org/apache/kafka/clients/Metadata.java
##########
@@ -217,12 +217,12 @@ public synchronized boolean updateRequested() {
         }
     }
 
-    public synchronized Map<String, Uuid> topicIds() {
-        return cache.topicIds();
+    public synchronized Uuid topicId(String topicName) {
+        return cache.topicId(topicName);
     }
 
-    public synchronized Map<Uuid, String> topicNames() {
-        return cache.topicNames();
+    public synchronized  String topicName(Uuid topicId) {

Review comment:
       nit: extra space after `synchronized`

##########
File path: clients/src/main/java/org/apache/kafka/clients/Metadata.java
##########
@@ -217,12 +217,12 @@ public synchronized boolean updateRequested() {
         }
     }
 
-    public synchronized Map<String, Uuid> topicIds() {
-        return cache.topicIds();
+    public synchronized Uuid topicId(String topicName) {

Review comment:
       In the 3.0 patch, I think we added javadoc comments: 
https://github.com/apache/kafka/pull/10952/files#diff-97c2911e6e1b97ed9b3c4e76531a321d8ea1fc6aa2c727c27b0a5e0ced893a2cR221.

##########
File path: clients/src/main/java/org/apache/kafka/clients/Metadata.java
##########
@@ -389,6 +397,11 @@ else if (metadata.error() == 
Errors.TOPIC_AUTHORIZATION_FAILED)
                 log.debug("Updating last seen epoch for partition {} from {} 
to epoch {} from new metadata", tp, currentEpoch, newEpoch);
                 lastSeenLeaderEpochs.put(tp, newEpoch);
                 return Optional.of(partitionMetadata);
+            } else if (changedTopicId) {

Review comment:
       I thought we changed the order of this in the 3.0 patch. We should be 
checking for a changed topic id before comparing epochs.




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