-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] new load balancer system topic should not be auto-created now #20566
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
Merged
Technoboy-
merged 1 commit into
apache:master
from
heesung-sohn:fix-new-lb-topic-auto-creation
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me, but we should finally change it to a partitioned topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is another optimization area for scalability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it that in some cases we auto create in a non-partitioned way and in this case we do not auto create it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I understood your question. Since the system topic is currently expected to work on a non-partitioned topic, we specifically create the topic in ServiceUnitStateChannelImpl.start(). This change will block the system topic auto-creation(when any other broker tries to auto-create the topic due to any race-condition )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was mixing up #20370 and #20397.
My primary concern is that the solution in this PR creates a special case instead of creating a framework to make it easier to build system topics in the future. In my opinion, the load manager should be contained by the relevant interfaces and should not be referenced here. There is some relevant discussion about system topics in this PR too #20514 (comment). There is also relevant discussion on the ML here https://lists.apache.org/thread/f0q8n0hf1lgw9r2j53tm4yjjfdyr9kjd.
I think it is relevant that until now, we have always allowed system topics to be auto created to prevent classes of failures.
If I were to guess, the problem this PR is trying to solve is actually more generic than the system topics we're working with here. It is likely a challenge for all pulsar users to know how to create their topics correctly. That is one reason I want to push for thinking about a general solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can make this fix general like the followings.
Maintain a White-list for system topics that are pre-created. We can check this list and reject any auto creation here.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A third option is to only auto create topics as non-partitioned topics. Any component that needs to create a system topic as a partitioned topic could do so on start up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I proposed as much here on the ML: https://lists.apache.org/thread/1lndgf1hx821fc12t0pc6j6zdrhkntht.