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 #7671] filter inner producer client when report to metrics #7673

Closed
wants to merge 1 commit into from

Conversation

zhiliatom
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes #7671

Brief Description

How Did You Test This Change?

@codecov-commenter
Copy link

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (71a7a65) 43.17% compared to head (6decae3) 43.13%.
Report is 4 commits behind head on develop.

Files Patch % Lines
.../rocketmq/broker/metrics/BrokerMetricsManager.java 0.00% 7 Missing ⚠️
...main/java/org/apache/rocketmq/store/CommitLog.java 25.00% 5 Missing and 1 partial ⚠️
...lient/impl/consumer/DefaultMQPushConsumerImpl.java 40.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #7673      +/-   ##
=============================================
- Coverage      43.17%   43.13%   -0.05%     
- Complexity      9797     9798       +1     
=============================================
  Files           1165     1165              
  Lines          84477    84486       +9     
  Branches       10966    10968       +2     
=============================================
- Hits           36474    36441      -33     
- Misses         43473    43516      +43     
+ Partials        4530     4529       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

clone.forEach((group, map) -> {
if (MixAll.CLIENT_INNER_PRODUCER_GROUP.equals(group)) {
groupChannelTable.remove(group);
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe remove is unnecessary, we just need the filtered count.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review, but I think remove in a clone map won't affect original map

@zhiliatom
Copy link
Contributor Author

@ShadowySpirits take a look at this pr

ConcurrentHashMap<String, ConcurrentHashMap<Channel, ClientChannelInfo>> clone = new ConcurrentHashMap<>(groupChannelTable);
clone.forEach((group, map) -> {
if (MixAll.CLIENT_INNER_PRODUCER_GROUP.equals(group)) {
groupChannelTable.remove(group);
Copy link
Contributor

Choose a reason for hiding this comment

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

looks that you removed the keys in groupChannelTable but used clone map at last

Copy link

This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.

@github-actions github-actions bot added the stale label Jan 17, 2025
Copy link

This PR was closed because it has been inactive for 3 days since being marked as stale.

@github-actions github-actions bot closed this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Producer connection is incorrect when use otel statistics
4 participants