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

optimize: fast fail when channel is null #7075

Merged
merged 2 commits into from
Dec 26, 2024

Conversation

lyl2008dsg
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

This PR enhances the RmNettyRemotingClient#sendRegisterMessage method by improving its error handling when the channel parameter is null.

Ⅱ. Does this pull request fix one issue?

Fixes #7057

Ⅲ. Why don't you add test cases (unit test/integration test)?

org.apache.seata.core.rpc.netty.RmNettyClientTest#testSendAsyncRequestWithNullChannelLogsWarning

Ⅳ. Describe how to verify it

  1. Run Unit Tests: Execute the test suite to ensure all new and existing tests pass.
    mvn test
    
  • org.apache.seata.core.rpc.netty.RmNettyClientTest#testSendAsyncRequestWithNullChannelLogsWarning

@funky-eyes funky-eyes added this to the 2.4.0 milestone Dec 25, 2024
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.65%. Comparing base (340ea92) to head (01d776d).
Report is 1 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                2.x    #7075   +/-   ##
=========================================
  Coverage     52.65%   52.65%           
- Complexity     6665     6666    +1     
=========================================
  Files          1129     1129           
  Lines         40168    40168           
  Branches       4708     4708           
=========================================
+ Hits          21150    21152    +2     
  Misses        16999    16999           
+ Partials       2019     2017    -2     
Files with missing lines Coverage Δ
...ta/core/rpc/netty/AbstractNettyRemotingClient.java 30.27% <100.00%> (+1.37%) ⬆️

... and 4 files with indirect coverage changes

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit c0a2e92 into apache:2.x Dec 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When the channel is empty, the request will be blocked
2 participants