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 2020/04/17 04:52:42 UTC

[GitHub] [pulsar] addisonj opened a new pull request #6750: [broker] Increase timeout for loading topics

addisonj opened a new pull request #6750: [broker] Increase timeout for loading topics
URL: https://github.com/apache/pulsar/pull/6750
 
 
   In #6489, a timeout was introduced to make sure calls into the
   BrokerService finish or error out. However, this timeout is too low by
   default when loading topics that have many replicated clusters.
   
   Loading replicated topics is quite an expensive operation, involve
   global ZK lookups and the start of many sub-processes. While we would
   hope it finishes in 60 seconds we want to safe.
   
   Long term, it may make sense to break out this operation into more
   steps where each step can have it's own timeout
   

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


With regards,
Apache Git Services

[GitHub] [pulsar] codelipenghui commented on a change in pull request #6750: [broker] Increase timeout for loading topics

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #6750: [broker] Increase timeout for loading topics
URL: https://github.com/apache/pulsar/pull/6750#discussion_r410027584
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
 ##########
 @@ -861,7 +861,8 @@ public PulsarAdmin getClusterPulsarAdmin(String cluster) {
     protected CompletableFuture<Optional<Topic>> loadOrCreatePersistentTopic(final String topic,
             boolean createIfMissing) throws RuntimeException {
         checkTopicNsOwnership(topic);
-        final CompletableFuture<Optional<Topic>> topicFuture = futureWithDeadline();
+        // this timeout needs to be extra long in the case of topics with many replication clusters
+        final CompletableFuture<Optional<Topic>> topicFuture = futureWithDeadline(5L, TimeUnit.MINUTES, new TimeoutException("Failed to load topic within timeout"));
 
 Review comment:
   It's better to make the timeout of the topic loading configurable in the broker.conf

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


With regards,
Apache Git Services