BewareMyPower commented on code in PR #16043:
URL: https://github.com/apache/pulsar/pull/16043#discussion_r896341600


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -4085,9 +4085,21 @@ public static 
CompletableFuture<PartitionedTopicMetadata> unsafeGetPartitionedTo
                 }
                 metadataFuture.complete(metadata);
             }).exceptionally(ex -> {
-            metadataFuture.completeExceptionally(ex.getCause());
-            return null;
-        });
+                    if (ex.getCause() instanceof 
MetadataStoreException.AlreadyExistsException) {
+                        // The partitioned topic might be created concurrently
+                        
pulsar.getBrokerService().fetchPartitionedTopicMetadataAsync(topicName)

Review Comment:
   Good suggestions. I was concerned about the effect on other places before. 
But it should be the right behavior for it, including the admin operations.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to