heesung-sn commented on code in PR #20566:
URL: https://github.com/apache/pulsar/pull/20566#discussion_r1235995230


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -3304,10 +3305,19 @@ private CompletableFuture<Boolean> 
isAllowAutoTopicCreationAsync(final TopicName
                     topicName.getNamespaceObject());
             return CompletableFuture.completedFuture(false);
         }
-        //System topic can always be created automatically
+
+        // ServiceUnitStateChannelImpl.TOPIC expects to be a 
non-partitioned-topic now.
+        // We don't allow the auto-creation here.
+        // ServiceUnitStateChannelImpl.start() is responsible to create the 
topic.
+        if (ServiceUnitStateChannelImpl.TOPIC.equals(topicName.toString())) {

Review Comment:
   I think we can make this fix general like the followings.
   
   1. Maintain a White-list for system topics that are pre-created. We can 
check this list and reject any auto creation here.
   
   2. Or Make Pulsar pre-create all system topics, and then we can reject 
auto-creation for all topics under the system namespace.
   
   I think the first option is less intrusive.



-- 
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: [email protected]

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

Reply via email to