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

refactor(LmqBrokerStatsManager): Refactor Redundant Code in LmqBrokerStatsManager #9034

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

asapple
Copy link
Contributor

@asapple asapple commented Dec 6, 2024

Extracted the duplicated logic of replacing group and topic with LMQ_PREFIX based on configuration into a common method, improving code structure and maintainability.

Which Issue(s) This PR Fixes

Fixes #9033

Brief Description

Refactor the LmqBrokerStatsManager class by extracting the common logic that modifies the group and topic values into a private helper method.

…uplicate logic

Extracted the duplicated logic of replacing group and topic with LMQ_PREFIX based on configuration into a common method, improving code structure and maintainability.
@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 47.78%. Comparing base (d1fd7af) to head (7502b52).

Files with missing lines Patch % Lines
...he/rocketmq/store/stats/LmqBrokerStatsManager.java 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #9034   +/-   ##
==========================================
  Coverage      47.77%   47.78%           
+ Complexity     11827    11822    -5     
==========================================
  Files           1305     1305           
  Lines          91405    91344   -61     
  Branches       11748    11721   -27     
==========================================
- Hits           43673    43649   -24     
+ Misses         42324    42285   -39     
- Partials        5408     5410    +2     

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

@lizhanhui lizhanhui merged commit 4ea8d1f into apache:develop Dec 7, 2024
11 checks passed
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.

[Enhancement] Refactor Redundant Code in LmqBrokerStatsManager to Improve Maintainability and Readability
4 participants