pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jai1 commented on a change in pull request #884: Restrict partitioned-metadata rest-api access for cpp-client older than 1.21
Date Thu, 01 Jan 1970 00:00:00 GMT
jai1 commented on a change in pull request #884: Restrict partitioned-metadata rest-api access
for cpp-client older than 1.21
URL: https://github.com/apache/incubator-pulsar/pull/884#discussion_r151600599
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java
 ##########
 @@ -470,9 +474,22 @@ public PartitionedTopicMetadata getPartitionedMetadata(@PathParam("property")
St
             @PathParam("destination") @Encoded String destination,
             @QueryParam("authoritative") @DefaultValue("false") boolean authoritative) {
         destination = decode(destination);
-       return getPartitionedTopicMetadata(property, cluster, namespace, destination, authoritative);
+        PartitionedTopicMetadata metadata = getPartitionedTopicMetadata(property, cluster,
namespace, destination, authoritative);
+        if (metadata.partitions > 1) {
+            try {
+                validateClientVersion();
+            } catch (UnsupportedOperationException ue) {
 
 Review comment:
   Would prefer isClientVersionValid instead of the throwing  and catching exceptions.
   
   But otherwise - LGTM.
   

----------------------------------------------------------------
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

Mime
View raw message