asafm commented on code in PR #19235:
URL: https://github.com/apache/pulsar/pull/19235#discussion_r1111215058
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java:
##########
@@ -1284,7 +1289,11 @@ public void getPartitionedStats(
@ApiParam(value = "If return the earliest time in backlog")
@QueryParam("getEarliestTimeInBacklog") @DefaultValue("false")
boolean getEarliestTimeInBacklog) {
try {
- validatePartitionedTopicName(tenant, namespace, encodedTopic);
+ validateTopicName(tenant, namespace, encodedTopic);
Review Comment:
Same question. Seems like you inlined that method. Don't understand.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java:
##########
@@ -810,6 +810,11 @@ public void updatePartitionedTopic(
@ApiParam(value = "The number of partitions for the topic",
required = true, type = "int", defaultValue = "0")
int numPartitions) {
+ validateTopicName(tenant, namespace, encodedTopic);
Review Comment:
I'm actually not following here.
You add a call to `validateTopicName`, but in line 818, you have a call to
`validatePartitionedTopicName` which is:
```
// first, it has to be a validate topic name
validateTopicName(tenant, namespace, encodedTopic);
// second, "-partition-" is not allowed
if (encodedTopic.contains(TopicName.PARTITIONED_TOPIC_SUFFIX)) {
throw new RestException(Status.PRECONDITION_FAILED,
"Partitioned Topic Name should not contain
'-partition-'");
}
```
This seems to contain exactly the code you've added. So wham I missing here?
--
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]