[improve][broker] Refactor update topic partitions endpoint.#19166
Merged
eolivelli merged 16 commits intoJan 18, 2023
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19166 +/- ##
============================================
+ Coverage 43.01% 48.12% +5.10%
+ Complexity 10167 9640 -527
============================================
Files 747 636 -111
Lines 72255 60083 -12172
Branches 7786 6271 -1515
============================================
- Hits 31080 28913 -2167
+ Misses 37577 28048 -9529
+ Partials 3598 3122 -476
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Technoboy-
reviewed
Jan 18, 2023
| final PulsarAdmin adminClient; | ||
| int brokerMaximumPartitionsPerTopic = pulsarService.getConfiguration() | ||
| .getMaxNumPartitionsPerPartitionedTopic(); | ||
| if (brokerMaximumPartitionsPerTopic != 0 && expectPartitions > brokerMaximumPartitionsPerTopic) { |
Contributor
There was a problem hiding this comment.
brokerMaximumPartitionsPerTopic != 0 -> brokerMaximumPartitionsPerTopic > 0
Seems better
Technoboy-
approved these changes
Jan 18, 2023
eolivelli
approved these changes
Jan 18, 2023
gaozhangmin
pushed a commit
to gaozhangmin/pulsar
that referenced
this pull request
Apr 6, 2023
Merged
3 tasks
RobertIndie
added a commit
to streamnative/pulsarctl
that referenced
this pull request
May 16, 2023
…1067) ### Motivation There is two failed tests when using Pulsar 3.0.0: ``` === RUN TestUpdateTopicNotExist update_test.go:85: Error Trace: /pulsarctl/pkg/ctl/topic/update_test.go:85 Error: Not equal: expected: "code: 409 reason: Topic is not partitioned topic" actual : "code: 409 reason: Topic persistent://public/default/non-exist-topic is not the partitioned topic." Diff: --- Expected +++ Actual @@ -1 +1 @@ -code: 409 reason: Topic is not partitioned topic +code: 409 reason: Topic persistent://public/default/non-exist-topic is not the partitioned topic. Test: TestUpdateTopicNotExist --- FAIL: TestUpdateTopicNotExist (0.01s) === RUN TestUpdateNonPartitionedTopic update_test.go:96: Error Trace: /pulsarctl/pkg/ctl/topic/update_test.go:96 Error: Not equal: expected: "code: 409 reason: Topic is not partitioned topic" actual : "code: 409 reason: Topic persistent://public/default/test-update-non-partitioned-topic is not the partitioned topic." Diff: --- Expected +++ Actual @@ -1 +1 @@ -code: 409 reason: Topic is not partitioned topic +code: 409 reason: Topic persistent://public/default/test-update-non-partitioned-topic is not the partitioned topic. Test: TestUpdateNonPartitionedTopic --- FAIL: TestUpdateNonPartitionedTopic (0.02s) ``` More details in https://github.com/streamnative/pulsarctl/actions/runs/4976702208/jobs/8905382299?pr=1064#step:3:1349 This is because we change the log message in Pulsar 3.0.0 by this PR: apache/pulsar#19166 ### Modifications * Fix the assert of the test
RobertIndie
added a commit
to streamnative/pulsarctl
that referenced
this pull request
May 16, 2023
…1067) ### Motivation There is two failed tests when using Pulsar 3.0.0: ``` === RUN TestUpdateTopicNotExist update_test.go:85: Error Trace: /pulsarctl/pkg/ctl/topic/update_test.go:85 Error: Not equal: expected: "code: 409 reason: Topic is not partitioned topic" actual : "code: 409 reason: Topic persistent://public/default/non-exist-topic is not the partitioned topic." Diff: --- Expected +++ Actual @@ -1 +1 @@ -code: 409 reason: Topic is not partitioned topic +code: 409 reason: Topic persistent://public/default/non-exist-topic is not the partitioned topic. Test: TestUpdateTopicNotExist --- FAIL: TestUpdateTopicNotExist (0.01s) === RUN TestUpdateNonPartitionedTopic update_test.go:96: Error Trace: /pulsarctl/pkg/ctl/topic/update_test.go:96 Error: Not equal: expected: "code: 409 reason: Topic is not partitioned topic" actual : "code: 409 reason: Topic persistent://public/default/test-update-non-partitioned-topic is not the partitioned topic." Diff: --- Expected +++ Actual @@ -1 +1 @@ -code: 409 reason: Topic is not partitioned topic +code: 409 reason: Topic persistent://public/default/test-update-non-partitioned-topic is not the partitioned topic. Test: TestUpdateNonPartitionedTopic --- FAIL: TestUpdateNonPartitionedTopic (0.02s) ``` More details in https://github.com/streamnative/pulsarctl/actions/runs/4976702208/jobs/8905382299?pr=1064#step:3:1349 This is because we change the log message in Pulsar 3.0.0 by this PR: apache/pulsar#19166 ### Modifications * Fix the assert of the test (cherry picked from commit 11a3e8f)
4 tasks
3 tasks
14 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
This PR follow-up #19086 to clean up complex logic and remove duplicate method invoke.
Modifications
Verifying this change
Does this pull request potentially affect one of the following parts:
Documentation
doc-not-needed