This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch branch-1.0
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-1.0 by this push:
new d407e7a245 [#4168] fix(kafka-catalog): make topic creation synchronous
(#8735)
d407e7a245 is described below
commit d407e7a24502b4cdfb237829a4a429db6683cc5a
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Sep 30 20:35:15 2025 +0800
[#4168] fix(kafka-catalog): make topic creation synchronous (#8735)
### 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
Co-authored-by: mchades <[email protected]>
---
.../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();