pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3786: [pulsar-function] fix deadlock in pulsar-source
Date Fri, 08 Mar 2019 17:04:13 GMT
sijie commented on a change in pull request #3786: [pulsar-function] fix deadlock in pulsar-source
URL: https://github.com/apache/pulsar/pull/3786#discussion_r263853404
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
 ##########
 @@ -100,7 +98,15 @@ public void open(Map<String, Object> config, SourceContext sourceContext)
throws
             }
 
             return cb.subscribeAsync();
-        }).collect(Collectors.toList()).stream().map(CompletableFuture::join).collect(Collectors.toList());
+        }).collect(Collectors.toList()).stream().map(consumerFuture -> {
+            try {
+                return consumerFuture.get(consumerOpTimeoutMs, TimeUnit.MILLISECONDS);
 
 Review comment:
   @rdhabalia this sounds like a hack to me. do we know what causes the deadlock here?

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

Mime
View raw message