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 #9040

Closed
wants to merge 5 commits into from

Conversation

asapple
Copy link
Contributor

@asapple asapple commented Dec 9, 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.
@asapple asapple changed the title Improve Code Readability for Name Server Address Management [Issues #9039]Improve Code Readability for Name Server Address Management Dec 9, 2024
@asapple asapple changed the title [Issues #9039]Improve Code Readability for Name Server Address Management [ISSUE #9039]Improve Code Readability for Name Server Address Management Dec 9, 2024
asapple and others added 4 commits December 9, 2024 23:02
- 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.
@asapple asapple closed this Dec 10, 2024
@asapple asapple reopened this Dec 10, 2024
@asapple asapple closed this Dec 10, 2024
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 47.89%. Comparing base (564e55e) to head (2c997d1).

Files with missing lines Patch % Lines
...e/rocketmq/remoting/netty/NettyRemotingClient.java 0.00% 26 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9040      +/-   ##
=============================================
- Coverage      47.94%   47.89%   -0.05%     
+ Complexity     11888    11872      -16     
=============================================
  Files           1312     1312              
  Lines          91722    91724       +2     
  Branches       11749    11746       -3     
=============================================
- Hits           43978    43934      -44     
- Misses         42338    42371      +33     
- Partials        5406     5419      +13     

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

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
2 participants