poorbarcode commented on code in PR #22206:
URL: https://github.com/apache/pulsar/pull/22206#discussion_r1607045044


##########
pulsar-common/src/main/proto/PulsarApi.proto:
##########
@@ -300,6 +300,7 @@ message FeatureFlags {
   optional bool supports_broker_entry_metadata = 2 [default = false];
   optional bool supports_partial_producer = 3 [default = false];
   optional bool supports_topic_watchers = 4 [default = false];
+  optional bool supports_get_partitioned_meta_v2 = 5 [default = false];

Review Comment:
   Renamed.



##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/LookupService.java:
##########
@@ -59,12 +59,19 @@ public interface LookupService extends AutoCloseable {
     CompletableFuture<LookupTopicResult> getBroker(TopicName topicName);
 
     /**
-     * Returns {@link PartitionedTopicMetadata} for a given topic.
-     *
-     * @param topicName topic-name
-     * @return
+     * 1.Get the partitions if the topic exists. Return "{partition: n}" if a 
partitioned topic exists;
+     *  return "{partition: 0}" if a non-partitioned topic exists.
+     * 2. When {@param metadataAutoCreationEnabled} is "false," neither 
partitioned topic nor non-partitioned topic
+     *   does not exist. You will get an {@link 
PulsarClientException.NotFoundException}.
+     *  2-1. You will get a {@link 
PulsarClientException.NotSupportedException} if the broker's version is an older
+     *   one that does not support this feature and the Pulsar client is using 
a binary protocol "serviceUrl".
+     * 3.When {@param metadataAutoCreationEnabled} is "true," it will trigger 
an auto-creation for this topic(using
+     *  the default topic auto-creation strategy you set for the broker), and 
the corresponding result is returned.
+     *  For the result, see case 1.
+     * @version 3.3.0.
      */
-    CompletableFuture<PartitionedTopicMetadata> 
getPartitionedTopicMetadata(TopicName topicName);

Review Comment:
   Sure, fixed



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