rdhabalia commented on code in PR #18212:
URL: https://github.com/apache/pulsar/pull/18212#discussion_r1006442974


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java:
##########
@@ -353,7 +353,8 @@ public synchronized ProducerStatsRecorderImpl getStats() {
             return null;
         }
         stats.reset();
-        producers.values().forEach(p -> 
stats.updateCumulativeStats(p.getStats()));
+        producers.forEach(
+                (partition, producer) -> 
stats.updateCumulativeStats(producer.getTopic(), producer.getStats()));

Review Comment:
   here, we are keeping map of <topicName, stats> to maintain consistency with 
consumer-stats.
   so, code change is correct where we are not using partition but we are using 
actual topic name of the partition.



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