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

The hash calculation error causes the label of metrics not to be updated. #95

Closed
cserwen opened this issue Mar 8, 2022 · 0 comments · Fixed by #96
Closed

The hash calculation error causes the label of metrics not to be updated. #95

cserwen opened this issue Mar 8, 2022 · 0 comments · Fixed by #96

Comments

@cserwen
Copy link
Member

cserwen commented Mar 8, 2022

Describe the bug
When the consumer is closed, the countOfOnlineConsumers of metrhc: rocketmq_group_diff won't be changed to 0.

To Reproduce
Steps to reproduce the behavior:

  1. Start a consumer and running for a while.
  2. Shutdown it and you will see the value of countOfOnlineConsumers still is 1.

Expected behavior
The value of countOfOnlineConsumers should be 0.

Screenshots

Additional context
The root cause is that the following code.


The class ConsumerTopicDiffMetric has four fields:

private String group;
private String topic;
private String countOfOnlineConsumers;
private String msgModel; //0:broadcast, 1:cluster

It only calculates topic abd group. So when countOfOnlineConsumers changed, The new key will not be added.

duhenglucky added a commit that referenced this issue Mar 8, 2022
[ISSUE #95] hashCode() and equats() should calculate all fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant