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 2021/06/24 13:02:56 UTC

[GitHub] [pulsar] suiyuzeng opened a new issue #11079: Increase the rate of topic creation

suiyuzeng opened a new issue #11079:
URL: https://github.com/apache/pulsar/issues/11079


   **Is your enhancement request related to a problem? Please describe.**
      The count of topic created in 1 second is less than 200, when the topic count of the namespace is about 200,000.
   
   **Describe the solution you'd like**
      Increase the rate of topic creation.
   
   **Describe alternatives you've considered**
      The reason is that the time cost of topic exist checking is too long when the topic count is large.
       protected CompletableFuture<Boolean> checkTopicExistsAsync(TopicName topicName) {
           return pulsar().getNamespaceService().getListOfTopics(topicName.getNamespaceObject(),
                   CommandGetTopicsOfNamespace.Mode.ALL)
                   .thenCompose(topics -> {
                       boolean exists = false;
                       for (String topic : topics) {
                           if (topicName.getPartitionedTopicName().equals(
                                   TopicName.get(topic).getPartitionedTopicName())) {
                               exists = true;
                               break;
                           }
                       }
                       return CompletableFuture.completedFuture(exists);
                   });
       } 
   
      Can we use org.apache.pulsar.broker.namespace.NamespaceService#checkTopicExists  to check if the topic is exits?
   
   **Additional context**
   None
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] suiyuzeng closed issue #11079: Increase the rate of topic creation

Posted by GitBox <gi...@apache.org>.
suiyuzeng closed issue #11079:
URL: https://github.com/apache/pulsar/issues/11079


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org