Use ExecutorService instead of event loop for Netty connection
This change addresses the issue of the event loop being blocked for an extended period, improving overall performance and responsiveness.
What is the purpose of the change
This PR addresses the issue #13853 where connectionClient.doConnect() was blocking the event loop for up to 3 seconds.
To resolve this, the connection process has been moved to a separate thread using an ExecutorService.
Brief changelog
Changes:
- Removed the scheduling of
connectionClient.doConnect()on the event loop. - Added submission of
connectionClient.doConnect()to anExecutorServiceto execute in a separate thread.
Verifying this change
Checklist
- [x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
- [ ] Add some description to dubbo-website project if you are requesting to add a feature.
- [ ] GitHub Actions works fine on your own branch.
- [ ] If this contribution is large, please follow the Software Donation Guide.
Please fix failed case
Ok. After fixing failed case, I'll make this ready.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.42%. Comparing base (
2f6b4c0) to head (1ba41c1). Report is 25 commits behind head on 3.2.
Additional details and impacted files
@@ Coverage Diff @@
## 3.2 #13904 +/- ##
==========================================
+ Coverage 70.39% 70.42% +0.03%
==========================================
Files 1607 1607
Lines 70070 70094 +24
Branches 10098 10102 +4
==========================================
+ Hits 49327 49367 +40
+ Misses 16116 16084 -32
- Partials 4627 4643 +16
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@icodening @AlbumenJ I have made the revisions. Could you please review them
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
25.9% Coverage on New Code
0.0% Duplication on New Code
@icodening PTAL
@EarthChen PTAL