This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new e1bc547add [#4168] fix(kafka-catalog): make topic creation synchronous 
(#8717)
e1bc547add is described below

commit e1bc547addbdaa863c15e200dfe68e54612f2c9a
Author: mchades <[email protected]>
AuthorDate: Tue Sep 30 16:22:16 2025 +0800

    [#4168] fix(kafka-catalog): make topic creation synchronous (#8717)
    
    ### What changes were proposed in this pull request?
    
    make topic creation synchronous
    
    ### Why are the changes needed?
    
    Fix: #4168
    
    ### Does this PR introduce _any_ user-facing change?
    
    no
    
    ### How was this patch tested?
    
    CI pass
---
 .../org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java     | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java
 
b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java
index 66f49a02c2..7455679897 100644
--- 
a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java
+++ 
b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java
@@ -259,6 +259,9 @@ public class KafkaCatalogOperations implements 
CatalogOperations, SupportsSchema
     try {
       CreateTopicsResult createTopicsResult =
           adminClient.createTopics(Collections.singleton(buildNewTopic(ident, 
properties)));
+      // Wait for topic creation to complete
+      createTopicsResult.all().get();
+
       Uuid topicId = createTopicsResult.topicId(ident.name()).get();
       Integer numPartitions = 
createTopicsResult.numPartitions(ident.name()).get();
       Integer replicationFactor = 
createTopicsResult.replicationFactor(ident.name()).get();

Reply via email to