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 #9039]Improve Code Readability for Name Server Address Management #9043

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

Conversation

asapple
Copy link
Contributor

@asapple asapple commented Dec 10, 2024

Refactor Name Server Address Update Logic. No functional changes, just refactoring for better clarity and maintainability.

Which Issue(s) This PR Fixes

Fixes #9039

Brief Description

Refactor Name Server Address Update Logic.

- Simplified the logic for checking if the name server address list needs to be updated.
- Moved channel closure logic into a new method `handleChannelClosureIfNeeded`.
- Improved maintainability and readability of the `updateNameServerAddressList` method.

No functional changes, just refactoring for better clarity and maintainability.
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 47.90%. Comparing base (564e55e) to head (2152ae8).

Files with missing lines Patch % Lines
...e/rocketmq/remoting/netty/NettyRemotingClient.java 0.00% 22 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9043      +/-   ##
=============================================
- Coverage      47.94%   47.90%   -0.05%     
+ Complexity     11888    11876      -12     
=============================================
  Files           1312     1312              
  Lines          91722    91720       -2     
  Branches       11749    11745       -4     
=============================================
- Hits           43978    43936      -42     
- Misses         42338    42365      +27     
- Partials        5406     5419      +13     

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

Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

LGTM

@asapple asapple requested a review from mxsm December 11, 2024 19:20
@asapple
Copy link
Contributor Author

asapple commented Dec 12, 2024

LGTM

Thank you for your review

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 Complex Logic in updateNameServerAddressList Method
3 participants