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:
[email protected]


With regards,
Apache Git Services

Reply via email to