Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The metrics of timerMessage are inaccurate and may even be negative. #7381

Closed
3 tasks done
GenerousMan opened this issue Sep 22, 2023 · 0 comments · Fixed by #7382
Closed
3 tasks done

[Bug] The metrics of timerMessage are inaccurate and may even be negative. #7381

GenerousMan opened this issue Sep 22, 2023 · 0 comments · Fixed by #7382

Comments

@GenerousMan
Copy link
Contributor

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

macos

RocketMQ version

5.1.3

JDK Version

No response

Describe the Bug

After the timer message is enqueueed, if the entry time wheel is slow, it will be directly thrown into the dequePutQueue, and the increment operation of metrics will not be performed.
This will cause the metrics of timerMessage to be inaccurate and may even be negative.

Steps to Reproduce

just start a local broker, and send timerMessage into it.
you need to set the deliver time now + 3~5ms.

What Did You Expect to See?

metrics should be the num of timer messages in the timing wheel.

What Did You See Instead?

image

Additional Context

No response

RongtongJin pushed a commit that referenced this issue Sep 23, 2023
* correct the timerMetrics' result.

* for further extension.

* checkstyle.

* use toLong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants