rocketmq
rocketmq copied to clipboard
[Enhancement] Optimize the metric calculation logic of the time wheel
Before Creating the Bug Report
-
[ ] I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
[X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Centos
RocketMQ version
develop
JDK Version
11
Describe the Bug
In each round of fetching an element, each element's message is a type, each message is addmetric() logic, the metric will fluctuate, but the final result is correct, after optimization only need to do addmetric once
Steps to Reproduce
Use arrays for correct calculations for each round of placement
What Did You Expect to See?
metric is correctly
What Did You See Instead?
metric is incorrectly
Additional Context
No response