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

[ISSUE #5844] Fix bug when examine pop consumer group info #5956

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

HScarb
Copy link
Contributor

@HScarb HScarb commented Jan 30, 2023

Make sure set the target branch to develop

What is the purpose of the change

Fix #5844

Brief changelog

Use examineBrokerClusterInfo instead of examine retry topic route info when examing broker addrs in examingConsumeStats and examingConsumerConnectionInfo methods.

Verifying this change

image

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

yuz10
yuz10 previously approved these changes Jan 30, 2023
result.getOffsetTable().putAll(consumeStats.getOffsetTable());
double value = result.getConsumeTps() + consumeStats.getConsumeTps();
result.setConsumeTps(value);
for (BrokerData brokerData : this.examineBrokerClusterInfo().getBrokerAddrTable().values()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scanning all clusters is not a good choice. This way is inefficient and easily leads to timeout, especially since the number of clusters is very large.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, old code also scan all clusters, because consumers send heartbeat and create retry topics on all brokers.
Do you have any suggestions for improvement here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, old code also scan all clusters, because consumers send heartbeat and create retry topics on all brokers. Do you have any suggestions for improvement here?

That's not exactly. If we only have one cluster, these two ways do not have differences. But in production practice, there are many broker clusters registered to the same nameserver cluster. So that your modification will access unnecessary clusters.

@codecov-commenter
Copy link

Codecov Report

Merging #5956 (53a08bb) into develop (eef581b) will decrease coverage by 0.01%.
The diff coverage is 68.42%.

@@              Coverage Diff              @@
##             develop    #5956      +/-   ##
=============================================
- Coverage      42.93%   42.93%   -0.01%     
+ Complexity      8995     8992       -3     
=============================================
  Files           1104     1104              
  Lines          78380    78373       -7     
  Branches       10207    10206       -1     
=============================================
- Hits           33654    33647       -7     
+ Misses         40512    40503       -9     
- Partials        4214     4223       +9     
Impacted Files Coverage Δ
...he/rocketmq/tools/admin/DefaultMQAdminExtImpl.java 25.42% <68.42%> (+0.31%) ⬆️

... and 27 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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 this pull request may close these issues.

Failed to examine pop consumer group status/progress/connection, no topic route for retry topic
4 participants