codelipenghui commented on a change in pull request #11686:
URL: https://github.com/apache/pulsar/pull/11686#discussion_r691821691



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -3773,9 +3773,9 @@ private void validatePartitionTopicUpdate(String 
topicName, int numberOfPartitio
         TopicName partitionTopicName = TopicName.get(domain(), namespaceName, 
topicName);
         PartitionedTopicMetadata metadata = 
getPartitionedTopicMetadata(partitionTopicName, false, false);
         int oldPartition = metadata.partitions;
-        String prefix = topicName + TopicName.PARTITIONED_TOPIC_SUFFIX;
+        String prefix = partitionTopicName.getPartitionedTopicName() + 
TopicName.PARTITIONED_TOPIC_SUFFIX;
         for (String exsitingTopicName : existingTopicList) {
-            if (exsitingTopicName.contains(prefix)) {
+            if (exsitingTopicName.startsWith(prefix)) {

Review comment:
       @lhotari I don't think this is the same issue as #11148 wants to fix. 
This is a bug here, #11148 is trying to improve the topic creation logic.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to