[improve][broker] checkTopicExists supports checking partitioned topic without index#21701
Merged
Merged
Conversation
…c without index Signed-off-by: Zixuan Liu <nodeces@gmail.com>
bb1c587 to
4c02fbe
Compare
Technoboy-
requested changes
Dec 11, 2023
Technoboy-
left a comment
Contributor
There was a problem hiding this comment.
we should keep the original logic(check isPersistent first ) to avoid the topic is non-partitioned non-persistent
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
4229726 to
5ce1082
Compare
Member
Author
@Technoboy- Done. |
Member
Author
|
/pulsarbot rerun-failure-checks |
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21701 +/- ##
============================================
- Coverage 73.40% 73.38% -0.02%
- Complexity 32662 32757 +95
============================================
Files 1893 1893
Lines 140767 140709 -58
Branches 15506 15500 -6
============================================
- Hits 103328 103262 -66
- Misses 29321 29339 +18
+ Partials 8118 8108 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4 tasks
Technoboy-
approved these changes
Dec 19, 2023
Technoboy-
pushed a commit
that referenced
this pull request
May 18, 2024
…c without index (#21701) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
May 31, 2024
…c without index (apache#21701) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 8b8048c)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 4, 2024
…c without index (apache#21701) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 8b8048c)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 4, 2024
…c without index (apache#21701) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 8b8048c)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 7, 2024
…c without index (apache#21701) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 8b8048c)
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
The
checkTopicExistsmethod doesn't support checking the partitioned topic without the partition index.Modifications
Refactor the
checkTopicExistsmethod:-partition-, find the topic from the/managed-ledgerpath.managed-ledgerpath, returntrue, otherwise continue finding.getPartitionedTopicName()name to query the metadata of the topic from/admin/partitioned-topicspath, and returntrueifmetadata.partitionsis greater than 0, indicating that it is a partitioned topic and exists, otherwise go and find if the non-partitioned topic exist, the persistent topic exists in the/managed-ledgerspath, the non-persistent topic only exist in the broker'stopicsmap.Verifying this change
Added test.
Documentation
docdoc-requireddoc-not-neededdoc-complete