-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Issue 6793][broker] Add config of maxNumPartitionsPerPartitionedTopic #6794
Conversation
/pulsarbot run-failure-checks |
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.
The change looks good to me. Could you please help add some checks for partitioned topic auto-creation? If users enable the partitioned topic auto-creation, the maxNumPartitionsPerPartitionedTopic
should greater than defaultNumPartitions
.
@codelipenghui
Is this here or should I add some unit tests? pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java Lines 1896 to 1900 in 36d4f36
|
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
apache#6794) Fixes apache#6793 ### Motivation Now broker, can't set max number of partitions per partitioned topic. So we can't prevent to create partitioned topic by many partitions from server side. In this PR, introduce limit of max partitions to broker and to be able to control it. ### Modifications Add `maxNumPartitionsPerPartitionedTopic` config to broker and compare with numPartitions at create or update partitioned topic. If the config is set to `0`(is default), then disable the check.
apache#6794) Fixes apache#6793 ### Motivation Now broker, can't set max number of partitions per partitioned topic. So we can't prevent to create partitioned topic by many partitions from server side. In this PR, introduce limit of max partitions to broker and to be able to control it. ### Modifications Add `maxNumPartitionsPerPartitionedTopic` config to broker and compare with numPartitions at create or update partitioned topic. If the config is set to `0`(is default), then disable the check.
apache#6794) Fixes apache#6793 ### Motivation Now broker, can't set max number of partitions per partitioned topic. So we can't prevent to create partitioned topic by many partitions from server side. In this PR, introduce limit of max partitions to broker and to be able to control it. ### Modifications Add `maxNumPartitionsPerPartitionedTopic` config to broker and compare with numPartitions at create or update partitioned topic. If the config is set to `0`(is default), then disable the check.
apache#6794) Fixes apache#6793 ### Motivation Now broker, can't set max number of partitions per partitioned topic. So we can't prevent to create partitioned topic by many partitions from server side. In this PR, introduce limit of max partitions to broker and to be able to control it. ### Modifications Add `maxNumPartitionsPerPartitionedTopic` config to broker and compare with numPartitions at create or update partitioned topic. If the config is set to `0`(is default), then disable the check.
Fixes #6793
Motivation
Now broker, can't set max number of partitions per partitioned topic. So we can't prevent to create partitioned topic by many partitions from server side.
In this PR, introduce limit of max partitions to broker and to be able to control it.
Modifications
Add
maxNumPartitionsPerPartitionedTopic
config to broker and compare with numPartitions at create or update partitioned topic.If the config is set to
0
(is default), then disable the check.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation