[fix][broker] Reject auto create partitioned topic when topic name contains -partition- - #14920
Conversation
…ins ``-partition-``
-partition--partition-
|
@Technoboy- @AnonHxy PTAL :) |
|
LGTM |
Jason918
left a comment
There was a problem hiding this comment.
I think it's better to narrow the limitation to ends with -partition-\d+
@mattisonchao What do you think about this? |
@Jason918 |
|
Hi, @Jason918 |
|
/pulsarbot rerun-failure-checks |
|
/pulsarbot rerun-failure-checks |
…ntains ``-partition-`` (apache#14920)
…ntains ``-partition-`` (apache#14920)
|
@mattisonchao It might introduce a breaking change for DLQ, please help check the topic auto-creation with partitioned topic can work with DLQ with this change. |
|
Yes, We have to revert this PR and start a discussion in the mail list to find another graceful method. |
Motivation
When the user set config as follow:
{ allowAutoTopicCreation: true, allowAutoTopicCreationType: "partitioned", defaultNumPartitions: 1 }they can create partitioned topic success with topic name
persistent://prop/autoNs/failedcreate-partition-abcde.run get-partitioned-topic-metadata
{ "partitions" : 1 }run
admin.topics().deletePartitionedTopic(topicName);run
admin.topics().delete(topicName)this operation can success delete the topic, but metadata still exists.
Modifications
Describe the modifications you've done.
Verifying this change
Add TCP/HTTP client test for this change.
Documentation
no-need-doc