pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a valid partition number

Open zjxxzjwang opened this issue 1 year ago • 4 comments

Motivation

If you actively create a topic with "-partition--x" (x is an integer)(for example, "peisisten://tenant-name/ns-name/topic-name-partition--1"), the topic can be created successfully, and a node with partition 3 will be attached to the zk. But it is not a partition topic

Modifications

By modifying the isAllowAutoTopicCreationAsync logic () method, when the topic name contains "- partiton - x" (x is an integer), trigger logic returns false

Clipboard_Screenshot_1732245902

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository:

zjxxzjwang avatar Nov 22 '24 03:11 zjxxzjwang

@lhotari Hello lhotari, this pr(https://github.com/apache/pulsar/pull/23562) merger was terminated because of the wrong deletion of the warehouse before. Now I have submitted the same pr again, please approve, thank you!

zjxxzjwang avatar Nov 22 '24 03:11 zjxxzjwang

@lhotari Hello lhotari, this pr(#23562) merger was terminated because of the wrong deletion of the warehouse before. Now I have submitted the same pr again, please approve, thank you!

@zjxxzjwang Makes sense. Please check the review comment about the code comment and the PR title change that I made.

lhotari avatar Nov 22 '24 07:11 lhotari

@lhotari PTAL.

Jason918 avatar Dec 03 '24 09:12 Jason918

@zjxxzjwang Please check the failing test, it seems like it's related to this change.

Jason918 avatar Dec 04 '24 03:12 Jason918