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
base: develop
Are you sure you want to change the base?
Conversation
result.getOffsetTable().putAll(consumeStats.getOffsetTable()); | ||
double value = result.getConsumeTps() + consumeStats.getConsumeTps(); | ||
result.setConsumeTps(value); | ||
for (BrokerData brokerData : this.examineBrokerClusterInfo().getBrokerAddrTable().values()) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 Report
@@ 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
... and 27 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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 inexamingConsumeStats
andexamingConsumerConnectionInfo
methods.Verifying this change
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
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.