-
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
[fix][broker] Update topic partition failed when config maxNumPartitionsPerPartitionedTopic<0 #22397
[fix][broker] Update topic partition failed when config maxNumPartitionsPerPartitionedTopic<0 #22397
Conversation
…onsPerPartitionedTopic<0
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.
LGTM
/pulsarbot rerun-failure-checks |
Closing and reopening to trigger a completely new build with changes from master since more than 3 days has passed when the build was run (shared build artifacts will no longer be available). |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22397 +/- ##
============================================
- Coverage 73.57% 73.15% -0.42%
+ Complexity 32624 32182 -442
============================================
Files 1877 1885 +8
Lines 139502 143509 +4007
Branches 15299 16306 +1007
============================================
+ Hits 102638 104989 +2351
- Misses 28908 30309 +1401
- Partials 7956 8211 +255
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…onsPerPartitionedTopic<0 (apache#22397) (cherry picked from commit fb5caeb) (cherry picked from commit 386f6f0)
…onsPerPartitionedTopic<0 (apache#22397) (cherry picked from commit fb5caeb) (cherry picked from commit 386f6f0)
…onsPerPartitionedTopic<0 (apache#22397)
Motivation
When the configuration
maxNumPartitionsPerPartitionedTopic <= 0
, we should consider the check to be disabled.However, the behavior has been modified in this PR: #19166
This will cause an error when update topic partition if
maxNumPartitionsPerPartitionedTopic<0
.When
maxNumPartitionsPerPartitionedTopic=-1
try to update topicpersistent://test-tenant/test-ns/test-topic
partition number from 1 to 2. We will see the following log:2024-04-02T19:42:01,593+0800 [pulsar-web-47-12] ERROR org.apache.pulsar.broker.admin.v2.PersistentTopics (PersistentTopics.java:844) - [null][persistent://test-tenant/test-ns/test-topic] Failed to update partition to 2 java.util.concurrent.CompletionException: org.apache.pulsar.broker.web.RestException: Desired partitions 2 can't be greater than the maximum partitions per topic -1.
Modifications
brokerMaximumPartitionsPerTopic != 0
=>brokerMaximumPartitionsPerTopic > 0
Documentation
doc
doc-required
doc-not-needed
doc-complete