You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/12/17 04:29:58 UTC

[GitHub] [rocketmq] xiangwangcheng opened a new issue #1656: The stats data could be inaccurate of first minute/hour/day

xiangwangcheng opened a new issue #1656: The stats data could be inaccurate of first minute/hour/day
URL: https://github.com/apache/rocketmq/issues/1656
 
 
   For a particular topic, the StatsItem won't be created and put into `statsItemTable` table until it is first used(sending message). As a result, we don't have an initial state(stats value is 0) of each snapshot list.
   And since the stats data are computed by calculating the difference between the last and the first value in snapshot value, we could get wrong results at the first minute/hours/day.
   
   Just like the picture below:
   ![image](https://user-images.githubusercontent.com/8049014/70962324-b2dea700-20bf-11ea-96ad-e86aae37ab93.png)
   
   The 100 messages seem like miscounted. 
   
   对于一个topic,只有在使用它收发消息时才会创建一个对应的StatsItem对象并放入statsItemTable中。所以,snapshot list里面没有初始化记录(统计数据为0的记录)。因为我们是将snapshot list的最后一个和第一个记录相减,像图中所示,可能出现统计数据错误。对用户来说,过去一分钟明明发了100条消息,得到的统计数据却为0。

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services