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: optimize fileListener to decrease cpu time usage #3222

Merged

Conversation

caohdgege
Copy link
Contributor

@caohdgege caohdgege commented Oct 26, 2020

Ⅰ. Describe what this PR did

由原来的每个dataId, configurationListener对应一个FileListener的死循环
改成所有的FileListener就对应一个死循环

Ⅱ. Does this pull request fix one issue?

fixes #3571

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@caohdgege caohdgege changed the title opeimize: use fileListener singleton opeimize: modify fileListener to decrease cpu time usage Oct 26, 2020
@codecov-io
Copy link

codecov-io commented Oct 26, 2020

Codecov Report

Merging #3222 into develop will decrease coverage by 0.00%.
The diff coverage is 73.68%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3222      +/-   ##
=============================================
- Coverage      51.08%   51.08%   -0.01%     
+ Complexity      3275     3273       -2     
=============================================
  Files            612      612              
  Lines          20057    20063       +6     
  Branches        2501     2504       +3     
=============================================
+ Hits           10246    10249       +3     
  Misses          8792     8792              
- Partials        1019     1022       +3     
Impacted Files Coverage Δ Complexity Δ
...c/main/java/io/seata/config/FileConfiguration.java 43.29% <73.68%> (+1.52%) 11.00 <0.00> (ø)
...o/seata/server/coordinator/DefaultCoordinator.java 54.63% <0.00%> (-0.52%) 28.00% <0.00%> (-1.00%)
...in/java/io/seata/server/session/GlobalSession.java 82.72% <0.00%> (-0.46%) 70.00% <0.00%> (-1.00%)

@funky-eyes funky-eyes added this to the 1.4.0 milestone Oct 27, 2020
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
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly changed the title opeimize: modify fileListener to decrease cpu time usage optimize: modify fileListener to decrease cpu time usage Oct 28, 2020
@slievrly slievrly changed the title optimize: modify fileListener to decrease cpu time usage optimize: optimize fileListener to decrease cpu time usage Oct 28, 2020
@slievrly slievrly merged commit 80573c9 into apache:develop Oct 28, 2020
@caohdgege caohdgege deleted the optimize-use-fileListener-singleton branch February 23, 2021 09:50
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.

seata 1.2.0 FileConfiguration.java 问题
4 participants