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: do not load LoadBalance if not necessary #3735

Merged

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented May 17, 2021

Ⅰ. Describe what this PR did

optimize: Do not load LoadBalance if not necessary.
优化:当负载均衡不需要时,不加载它。

优化的原因:

部分用户的系统本来不大,单个seata服务就够用了。这时候跳过获取负载均衡器,性能也会好一些。
最主要的是,即使负载均衡的配置错误,也不会影响这部分用户的项目启动。

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2021

Codecov Report

Merging #3735 (a6b78e6) into develop (b7943e9) will decrease coverage by 0.01%.
The diff coverage is 40.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3735      +/-   ##
=============================================
- Coverage      51.33%   51.32%   -0.02%     
+ Complexity      3578     3575       -3     
=============================================
  Files            646      645       -1     
  Lines          21809    21808       -1     
  Branches        2737     2737              
=============================================
- Hits           11196    11192       -4     
- Misses          9477     9481       +4     
+ Partials        1136     1135       -1     
Impacted Files Coverage Δ Complexity Δ
...ta/core/rpc/netty/AbstractNettyRemotingClient.java 17.96% <0.00%> (-0.45%) 8.00 <0.00> (ø)
...scovery/loadbalance/ConsistentHashLoadBalance.java 89.28% <100.00%> (ø) 3.00 <1.00> (ø)
.../discovery/loadbalance/LeastActiveLoadBalance.java 100.00% <100.00%> (ø) 7.00 <1.00> (ø)
...seata/discovery/loadbalance/RandomLoadBalance.java 100.00% <100.00%> (ø) 2.00 <1.00> (ø)
...a/discovery/loadbalance/RoundRobinLoadBalance.java 66.66% <100.00%> (ø) 3.00 <1.00> (ø)

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

Copy link
Contributor

@caohdgege caohdgege left a comment

Choose a reason for hiding this comment

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

LGTM

@wangliang181230 wangliang181230 changed the title optimize: skip load balance if not needed optimize: Do not load LoadBalance if not necessary May 18, 2021
@caohdgege caohdgege changed the title optimize: Do not load LoadBalance if not necessary optimize: Do not load LB if not necessary May 18, 2021
@caohdgege caohdgege changed the title optimize: Do not load LB if not necessary optimize: do not load LoadBalance if not necessary May 18, 2021
@funky-eyes funky-eyes added this to the 1.5.0 milestone May 18, 2021
@funky-eyes funky-eyes added the module/core core module label May 18, 2021
@funky-eyes funky-eyes merged commit a3d3ee6 into apache:develop May 18, 2021
@wangliang181230 wangliang181230 deleted the optimize/before-load-balance branch May 18, 2021 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants