dugenkui03 commented on code in PR #4115:
URL: https://github.com/apache/rocketmq/pull/4115#discussion_r841713464


##########
tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:
##########
@@ -694,12 +708,28 @@ public GroupList queryTopicConsumeByWho(
         RemotingException, MQClientException {
         List<QueueTimeSpan> spanSet = new ArrayList<QueueTimeSpan>();
         TopicRouteData topicRouteData = this.examineTopicRouteInfo(topic);
-        for (BrokerData bd : topicRouteData.getBrokerDatas()) {
-            String addr = bd.selectBrokerAddr();
-            if (addr != null) {
-                
spanSet.addAll(this.mqClientInstance.getMQClientAPIImpl().queryConsumeTimeSpan(addr,
 topic, group, timeoutMillis));
-            }
-        }
+
+        Function<BrokerData, CompletableFuture<List<QueueTimeSpan>>> func = bd 
-> {
+            CompletableFuture<List<QueueTimeSpan>> future = new 
CompletableFuture<>();
+            executors.submit(() -> {
+                try {
+                    String addr = bd.selectBrokerAddr();
+                    if (addr != null) {

Review Comment:
   If `if (addr != null)` result in `true`, then a `future` which will never 
complete will return.



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