equanz commented on a change in pull request #12401:
URL: https://github.com/apache/pulsar/pull/12401#discussion_r797470620



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/NonPersistentTopicStatsImpl.java
##########
@@ -57,7 +62,11 @@
 
     @JsonProperty("publishers")
     public List<NonPersistentPublisherStats> getNonPersistentPublishers() {
-        return (List<NonPersistentPublisherStats>) nonPersistentPublishers;
+        return Stream.concat(nonPersistentPublishers.stream()
+                                
.sorted(Comparator.comparing(NonPersistentPublisherStats::getProducerName)),

Review comment:
       > do you really need this list to be sorted ?
   
   I don't strongly need the sorted order. It is for a consistent reason. 
Currently, publishers have some constant order even if they get stats in many 
times.
   I'll remove the reordering operation if we don't have to support consistent 
orders.




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