Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zjxxzjwang
Copy link
Contributor

@zjxxzjwang zjxxzjwang commented Nov 22, 2024

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
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 22, 2024
@zjxxzjwang zjxxzjwang marked this pull request as draft November 22, 2024 03:29
@zjxxzjwang
Copy link
Contributor Author

@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!

@lhotari lhotari changed the title [improve][broker]Restrict the creation of topics with "-partition--x" [improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a partition number Nov 22, 2024
@lhotari lhotari changed the title [improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a partition number [improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a positive partition number Nov 22, 2024
@lhotari lhotari changed the title [improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a positive partition number [improve][broker] Skip auto-creation for topics with "-partition-" suffix missing a valid partition number Nov 22, 2024
@lhotari
Copy link
Member

lhotari commented Nov 22, 2024

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

@zjxxzjwang zjxxzjwang marked this pull request as ready for review November 25, 2024 03:52
@Jason918
Copy link
Contributor

Jason918 commented Dec 3, 2024

@lhotari PTAL.

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zjxxzjwang zjxxzjwang requested a review from Jason918 December 3, 2024 13:30
@Jason918
Copy link
Contributor

Jason918 commented Dec 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants