junrao commented on code in PR #14840:
URL: https://github.com/apache/kafka/pull/14840#discussion_r1406631952


##########
storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManagerTest.java:
##########
@@ -70,18 +70,20 @@ public TopicBasedRemoteLogMetadataManager topicBasedRlmm() {
     }
 
     @Test
-    public void testInternalTopicExists() {
+    public void testDoesTopicExist() {
         Properties adminConfig = 
remoteLogMetadataManagerHarness.adminClientConfig();
         ListenerName listenerName = 
remoteLogMetadataManagerHarness.listenerName();
         try (Admin admin = 
remoteLogMetadataManagerHarness.createAdminClient(listenerName, adminConfig)) {
-            String topic = 
topicBasedRlmm().config().remoteLogMetadataTopicName();
+            String topic = "test-topic-exist";
+            remoteLogMetadataManagerHarness.createTopic(topic, 1, 1, new 
Properties(),

Review Comment:
   `createTopic` only waits for the topic metadata to be committed in the 
metadata log, but not waiting for the metadata to be propagated to every 
broker. `topicBasedRlmm().doesTopicExist` calls `describeTopic` and only checks 
the metadata in a least loaded broker. So, it seems that there is no strong 
guarantee that `doesTopicExist` is always true?



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