gaozhangmin commented on a change in pull request #11686:
URL: https://github.com/apache/pulsar/pull/11686#discussion_r690926200
##########
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:
> same are
I don't think it's the same area, `validatePartitionTopicUpdate` only used
when updating partition of topic. it's not the same 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]