AnonHxy commented on code in PR #16916:
URL: https://github.com/apache/pulsar/pull/16916#discussion_r935495233


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -1342,16 +1343,35 @@ protected void 
internalGetPartitionedStats(AsyncResponse asyncResponse, boolean
                 return;
             }
             PartitionedTopicStatsImpl stats = new 
PartitionedTopicStatsImpl(partitionMetadata);
-            List<CompletableFuture<TopicStats>> topicStatsFutureList = 
Lists.newArrayList();
+            List<CompletableFuture<TopicStats>> topicStatsFutureList = new 
ArrayList<>(partitionMetadata.partitions);
+            AtomicBoolean exceptionFlag = new AtomicBoolean(false);

Review Comment:
   This check will break the loop if  throws `PulsarServerException`, that will 
avoid querying the left partitions stats. So I think it is useful @Technoboy-  



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