mlyahmed commented on a change in pull request #9786:
URL: https://github.com/apache/pulsar/pull/9786#discussion_r587495669



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -798,7 +800,7 @@ public void unloadNamespaceBundlesGracefully() {
                 });
             } else {
                 return topics.computeIfAbsent(topic, (topicName) -> {
-                    if (createIfMissing) {
+                    if (createIfMissing || 
TopicName.get(topicName).isPartitioned()) {

Review comment:
       A new version checked in 

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -797,9 +798,21 @@ public void unloadNamespaceBundlesGracefully() {
                     return this.loadOrCreatePersistentTopic(topicName, 
createIfMissing);
                 });
             } else {
-                return topics.computeIfAbsent(topic, (topicName) -> {
-                    if (createIfMissing) {
-                        return createNonPersistentTopic(topicName);
+                return topics.computeIfAbsent(topic, (name) -> {
+                    final TopicName topicName = TopicName.get(name);
+                    if (topicName.isPartitioned()) {
+                        try {
+                            final PartitionedTopicMetadata metadata = 
pulsar().getAdminClient().topics()
+                                    
.getPartitionedTopicMetadata(topicName.getPartitionedTopicName());

Review comment:
       Is there a better way for this check? 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to