You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "codelipenghui (via GitHub)" <gi...@apache.org> on 2023/04/07 02:00:32 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #19841: [fix] [broker] Fix infinite HTTP call getSubscriptions caused by wrong topicName

codelipenghui commented on code in PR #19841:
URL: https://github.com/apache/pulsar/pull/19841#discussion_r1160358589


##########
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java:
##########
@@ -231,7 +231,7 @@ public String getEncodedLocalName() {
     }
 
     public TopicName getPartition(int index) {
-        if (index == -1 || this.toString().contains(PARTITIONED_TOPIC_SUFFIX)) {
+        if (index == -1 || this.toString().endsWith(PARTITIONED_TOPIC_SUFFIX + index)) {

Review Comment:
   What I thought was the PR intent to allow the partitioned name can contain `-partition-` keyword to resolve the issue. But it will introduce a new unreasonable rule to the partitioned topic.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org