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 about ConfigFuture (#2013) #2018

Merged
merged 3 commits into from
Dec 12, 2019

Conversation

ph3636
Copy link
Contributor

@ph3636 ph3636 commented Dec 11, 2019

Describe what this PR did?
In the ConfigFuture class, it is currently implemented using CountDownLatch.
This synchronization method is relatively heavy, we should replace it with CompletableFuture to achieve.

Will not change the ConfigFuture API
Consider that the server will process a large number of Messages in the future, and the Get mode of the CompletableFuture will perform better when testing a large number of messages.

ph3636 and others added 2 commits December 11, 2019 19:13
@codecov-io
Copy link

codecov-io commented Dec 11, 2019

Codecov Report

Merging #2018 into develop will not change coverage.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff            @@
##             develop   #2018   +/-   ##
=========================================
  Coverage       55.1%   55.1%           
- Complexity      2473    2474    +1     
=========================================
  Files            444     444           
  Lines          14758   14758           
  Branches        1743    1742    -1     
=========================================
  Hits            8132    8132           
- Misses          5881    5884    +3     
+ Partials         745     742    -3
Impacted Files Coverage Δ Complexity Δ
...ain/java/io/seata/core/protocol/MessageFuture.java 83.33% <100%> (-0.67%) 10 <0> (-1)
...re/src/main/java/io/seata/config/ConfigFuture.java 45.83% <33.33%> (-3.11%) 8 <1> (ø)
...o/seata/server/coordinator/DefaultCoordinator.java 48.41% <0%> (+0.39%) 28% <0%> (+1%) ⬆️
...in/java/io/seata/server/session/GlobalSession.java 85.02% <0%> (+0.48%) 68% <0%> (+1%) ⬆️

Copy link
Member

@xingfudeshi xingfudeshi 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 An optimization about ConfigFuture (#2013) optimize: optimize about ConfigFuture (#2013) Dec 12, 2019
@xingfudeshi xingfudeshi merged commit b4c4218 into apache:develop Dec 12, 2019
@ph3636 ph3636 deleted the ConfigFuture branch December 21, 2019 11:56
@wangliang181230 wangliang181230 added this to the 1.0.0 milestone Aug 9, 2021
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.

None yet

6 participants