massakam opened a new pull request #5943: [pulsar-broker] Prevent creation of 
regular topic with the same name as existing partitioned topic
URL: https://github.com/apache/pulsar/pull/5943
 
 
   ### Motivation
   
   
   Currently, it is not possible to create a partitioned topic with the same 
name as an existing non-partitioned topic, but the reverse is possible.
   
   ```
   $ ./bin/pulsar-admin topics create persistent://public/default/t1
   $ ./bin/pulsar-admin topics create-partitioned-topic -p 2 
persistent://public/default/t1
   
   16:12:50.418 [AsyncHttpClient-5-1] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:8080/admin/v2/persistent/public/default/t1/partitions] Failed 
to perform http put request: javax.ws.rs.ClientErrorException: HTTP 409 Conflict
   This topic already exists
   
   Reason: This topic already exists
   
   $ ./bin/pulsar-admin topics create-partitioned-topic -p 2 
persistent://public/default/t2
   $ ./bin/pulsar-admin topics create persistent://public/default/t2
   $ ./bin/pulsar-admin topics list public/default
   
   "persistent://public/default/t2"
   "persistent://public/default/t1"
   
   $ ./bin/pulsar-admin topics list-partitioned-topics public/default
   
   "persistent://public/default/t2"
   ```
   
   These non-partitioned topics are not available and should not be created.
   
   ### Modifications
   
   When creating a non-partitioned topic, "409 Conflict" error will be returned 
if a partitioned topic with the same name already exists.

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


With regards,
Apache Git Services

Reply via email to