HScarb opened a new issue #3438:
URL: https://github.com/apache/rocketmq/issues/3438


   In `CommitLog#putMessage(final MessageExtBrokerInner msg)`, there are two 
lines of code for statistics.
   
   
https://github.com/apache/rocketmq/blob/master/store/src/main/java/org/apache/rocketmq/store/CommitLog.java#L710-L711
   
   ```java
           // Statistics
           
storeStatsService.getSinglePutMessageTopicTimesTotal(msg.getTopic()).add(1);
           
storeStatsService.getSinglePutMessageTopicSizeTotal(topic).add(result.getWroteBytes());
   ```
   
   As above, `getSinglePutMessageTopicSizeTotal(topic)` use `topic` variable 
which declare before.
   But if the message is a delay message, `topic` will be change to 
`"SCHEDULE_TOPIC_XXXX"`, and will keep this value until the very end. 
   
   
https://github.com/apache/rocketmq/blob/master/store/src/main/java/org/apache/rocketmq/store/CommitLog.java#L600-L623
   
   So I consider it should be 
`getSinglePutMessageTopicSizeTotal(msg.getTopic())`
   


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