RobertIndie commented on code in PR #16043: URL: https://github.com/apache/pulsar/pull/16043#discussion_r896298451
########## 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: Why don't we move this exception capture to here: https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L2642-L2645 -- 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