You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/02/06 22:57:19 UTC

[GitHub] jai1 commented on a change in pull request #1178: Validate topic name on broker side

jai1 commented on a change in pull request #1178: Validate topic name on broker side
URL: https://github.com/apache/incubator-pulsar/pull/1178#discussion_r166469693
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##########
 @@ -273,33 +278,47 @@ protected void handleLookup(CommandLookupTopic lookup) {
     @Override
     protected void handlePartitionMetadataRequest(CommandPartitionedTopicMetadata partitionMetadata) {
         final long requestId = partitionMetadata.getRequestId();
-        final String topicName = partitionMetadata.getTopic();
         if (log.isDebugEnabled()) {
-            log.debug("[{}] Received PartitionMetadataLookup from {} for {}", topicName, remoteAddress, requestId);
+            log.debug("[{}] Received PartitionMetadataLookup from {} for {}", partitionMetadata.getTopic(),
+                    remoteAddress, requestId);
         }
+
+        DestinationName topicName;
+        try {
+            topicName = DestinationName.get(partitionMetadata.getTopic());
 
 Review comment:
   DestinationName topicName = validateTopicName(partitionMetadata.getTopic(), requestId, true);
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services